Details
-
Bug
-
Resolution: Done
-
P2: Important
-
Qt Creator 3.0.0
-
None
-
346e84d219448bb583dbc4ad71a2850db30e1cc8
Description
There's some code in qt-creator/src/plugins/clangcodemodel/clangutils.cpp createClangOptions which uses ProjectPart to get project defines:
QStringList result; (...) result << buildDefines(pPart->projectDefines, false); (...) foreach (const QString &arg, result) qDebug() << "\t" << qPrintable(arg);
This is what it prints for the following $PROJECT.config content:
// ADD PREDEFINED MACROS HERE!
-DREDEFINED=MACROS HERE!
// ADD PREDEFINED MACROS HERE!
-DCOMPILER_MSVC
-DREDEFINED=MACROS HERE!
-DER_MSVC
(okay, I guess that's not how you add macros to the project, still funny)
// ADD PREDEFINED MACROS HERE!
#define COMPILER_MSVC
-DREDEFINED=MACROS HERE!
-DCOMPILER_MSVC
(almost correct!)
// ADD PREDEFINED MACROS HERE!
#define COMPILER_MSVC
-DREDEFINED=MACROS HERE!
-D= COMPILER_MSVC
This garbage is then fed to clang, which uses it for parsing source files