https://bugs.kde.org/show_bug.cgi?id=385768

--- Comment #5 from Kevin Funk <[email protected]> ---
The surprising thing is that libclang crashes, while plain clang does not:

Note: MWE is:
% cat ~/test.cpp                                                                
#include "test.h"
% cat ~/test.h                                                                  
#pragma once

[Serializable]
public ref class NeptuneException : Exception
{
};


% KDEV_CLANG_DISPLAY_ARGS=1
~/devel/build/kf5/kdevelop/kdevplatform/util/duchainify/duchainify ~/test.cpp   
Added 1 files to the background parser
parsing with 4 threads
Invocation: clang -ferror-limit=100 -fspell-checking -Wdocumentation
-Wunused-parameter -Wunreachable-code -Wall -std=c++11 -nostdinc -nostdinc++
-xc++ -isystem/usr/include/c++/6 -isystem/usr/include/x86_64-linux-gnu/c++/6
-isystem/usr/include/c++/6/backward -isystem/usr/local/include
-isystem/home/kfunk/devel/build/llvm/lib/clang/5.0.1/include
-isystem/usr/include/x86_64-linux-gnu -isystem/usr/include -imacros
/tmp/duchainify.J20863 /home/kfunk/test.cpp
libclang: crash detected during parsing: {
  'source_filename' : '/home/kfunk/test.cpp'
  'command_line_args' : ['clang', '-ferror-limit=100', '-fspell-checking',
'-Wdocumentation', '-Wunused-parameter', '-Wunreachable-code', '-Wall',
'-std=c++11', '-nostdinc', '-nostdinc++', '-xc++',
'-isystem/usr/include/c++/6', '-isystem/usr/include/x86_64-linux-gnu/c++/6',
'-isystem/usr/include/c++/6/backward', '-isystem/usr/local/include',
'-isystem/home/kfunk/devel/build/llvm/lib/clang/5.0.1/include',
'-isystem/usr/include/x86_64-linux-gnu', '-isystem/usr/include', '-imacros',
'/tmp/duchainify.J20863'],
  'unsaved_files' : [],
  'options' : 781,
}
zsh: segmentation fault  KDEV_CLANG_DISPLAY_ARGS=1  ~/test.cpp

% clang -ferror-limit=100 -fspell-checking -Wdocumentation -Wunused-parameter
-Wunreachable-code -Wall -std=c++11 -nostdinc -nostdinc++ -xc++
-isystem/usr/include/c++/6 -isystem/usr/include/x86_64-linux-gnu/c++/6
-isystem/usr/include/c++/6/backward -isystem/usr/local/include
-isystem/home/kfunk/devel/build/llvm/lib/clang/5.0.1/include
-isystem/usr/include/x86_64-linux-gnu -isystem/usr/include -imacros
/tmp/duchainify.J20863 /home/kfunk/test.cpp
In file included from /home/kfunk/test.cpp:1:
/home/kfunk/test.h:3:1: warning: decomposition declarations are a C++17
extension [-Wc++17-extensions]
[Serializable]
^~~~~~~~~~~~~~
/home/kfunk/test.h:3:1: error: C++ requires a type specifier for all
declarations
/home/kfunk/test.h:3:1: error: decomposition declaration cannot be declared
with type 'int'; declared type must be 'auto' or reference to 'auto'
/home/kfunk/test.h:3:1: error: decomposition declaration '[Serializable]'
requires an initializer
/home/kfunk/test.h:3:15: error: expected ';' after top level declarator
[Serializable]
              ^
              ;                                                                 
1 warning and 4 errors generated.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to