https://bugs.kde.org/show_bug.cgi?id=357774
Bug ID: 357774 Summary: C source files are not parsed by new Clang parser in mixed (C and C++) project Product: kdevelop Version: 4.90.90 Platform: Kubuntu Packages OS: Linux Status: UNCONFIRMED Severity: normal Priority: NOR Component: Language Support: CPP (Clang-based) Assignee: kdevelop-bugs-n...@kde.org Reporter: piotr.mierzwin...@gmail.com My project includes C and C++ files. When I run kdevelop from terminal (konsole) I can see a lot of messages saying: "libclang: crash detected during parsing". They all are referring to C source files. Example of message: kdevelop(2058)/(default) unknown: Failed to parse translation unit: "/media/piotrek/FreeAgent/linux_containers/kubuntu_15.10/home/piotrek/Projekty/Qt/qtcmd_work/qtcmd_git/qtcmd2/libs/xdgmime/xdgmimeparent.c" libclang: crash detected during parsing: { 'source_filename' : '/media/piotrek/FreeAgent/linux_containers/kubuntu_15.10/home/piotrek/Projekty/Qt/qtcmd_work/qtcmd_git/qtcmd2/libs/xdgmime/xdgmimeint.c' 'command_line_args' : ['-ferror-limit=100', '-fspell-checking', '-Wdocumentation', '-Wunused-parameter', '-Wunreachable-code', '-Wall', '-std=c++11', '-nostdinc', '-nostdinc++', '-xc++', '-include/usr/include/qt4/Qt/QtCore', '-include/usr/include/qt4/Qt/QtGui', '-include/usr/include/qt4/Qt/QtNetwork', '-isystem/media/piotrek/FreeAgent/linux_containers/kubuntu_15.10/usr/include/c++/5', '-isystem/media/piotrek/FreeAgent/linux_containers/kubuntu_15.10/usr/include/x86_64-linux-gnu/c++/5', '-isystem/media/piotrek/FreeAgent/linux_containers/kubuntu_15.10/usr/include/c++/5/backward', '-isystem/usr/local/include', '-isystem/media/piotrek/FreeAgent/linux_containers/kubuntu_15.10/usr/lib/llvm-3.6/lib/clang/3.6.2/include', '-isystem/usr/include/x86_64-linux-gnu', '-isystem/usr/include', '-imacros', '/tmp/kdevelop.If2058'], 'unsaved_files' : [], 'options' : 45, } kdevelop(2058)/(default) unknown: clang_parseTranslationUnit2 return with error code 2 And because of this I think that C files are not parsed properly. More visible effect is lack of semantic highlighting of source in editor. All C files coming from xdgmime project: git://anongit.freedesktop.org/xdg/xdgmime Clicking "Show imports" in "Problems view" showing empty list. My setting for clang are default, so in "Language Support" I have set "Compiler for path: Clang" and auto-detected is Clang and GCC (in this order). I use "Predefined profile c++11". Now I realized that maybe this bug report has no sense, because used standard "c++11" in Clang parser. Could somebody confirm it? And one more question. Whether it is possible to get semantic highlighting of C source file in editor in mixed (C++ and C) project? Reproducible: Always Steps to Reproduce: 1. Open mixed project (C and C++) in kdevelop Actual Results: no semantic highlighting of C source file in editor Expected Results: would be nice to have semantic highlighting of C source file in editor kdevelop and kdevplatform cloned at January 8-th 2016 (branch 5.0.0). -- You are receiving this mail because: You are watching all bug changes.