Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
Qt Creator 4.10.1, Qt Creator 4.11.0-beta1
-
None
-
Qt Creator installed using the official online installer.
Gentoo Linux AMD64.
-
-
ec4e9e91908e84c1d8778ae2b485ab10a3161025
Description
When using the CompilationDatabaseProjectManager plugin and opening a project from a compile_commands.json file, none of the C source files in it are recognized as part of the project if the first one of them contains an "-std=" option in "arguments". Example:
[ { "arguments": [ "gcc", "-c", "-std=gnu99", "-o", "obj/test.o", "src/test.c" ], "directory": "/home/realnc/projects/CompDatabaseTest", "file": "src/test.c" } ]
It doesn't matter if I replace "gcc" with g+, clang or clang+. If it's a *.c file, the "-std" argument prevents Creator from being able to parse any of the C files correctly and a yellow icon appears at the top that says: "This file is not part of any project."
The problem doesn't exist with C++ sources. For example, this works fine:
[ { "arguments": [ "g++", "-c", "-std=c++14", "-o", "obj/test.o", "src/test.cpp" ], "directory": "/home/realnc/projects/CompDatabaseTest", "file": "src/test.cpp" } ]
Attachments
For Gerrit Dashboard: QTCREATORBUG-23143 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
283921,2 | CompilationDatabaseProjectManager: Fix file classification error | 4.11 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |