diff options
author | Wolfgang Beck <wolfgang.beck@nokia.com> | 2010-01-19 15:26:08 +1000 |
---|---|---|
committer | Wolfgang Beck <wolfgang.beck@nokia.com> | 2010-01-19 15:26:08 +1000 |
commit | 4b3388172904e629fc6f6f1e3a6323e8fe12b97f (patch) | |
tree | 098dca6bbe72201050a4d8ec94c008903eb67ed3 /src/libs/cplusplus/pp-engine.cpp | |
parent | 29b7594b38f3545bb6a5d5ff08542c0e71a30197 (diff) | |
download | qt-creator-4b3388172904e629fc6f6f1e3a6323e8fe12b97f.tar.gz |
Merge ichecker branch changes into the mainline. New project can be found under src/tools/ICheck
Diffstat (limited to 'src/libs/cplusplus/pp-engine.cpp')
-rw-r--r-- | src/libs/cplusplus/pp-engine.cpp | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/src/libs/cplusplus/pp-engine.cpp b/src/libs/cplusplus/pp-engine.cpp index 4ad7854d77..7b9ad5ec41 100644 --- a/src/libs/cplusplus/pp-engine.cpp +++ b/src/libs/cplusplus/pp-engine.cpp @@ -871,27 +871,33 @@ void Preprocessor::preprocess(const QString &fileName, const QByteArray &source, expandBuiltinMacro(identifierToken, spell); else { - if (Macro *m = env->resolve(spell)) { - if (! m->isFunctionLike()) { - if (0 == (m = processObjectLikeMacro(identifierToken, spell, m))) - continue; +#ifdef ICHECK_BUILD + if(spell != "Q_PROPERTY" && spell != "Q_INVOKABLE" && spell != "Q_ENUMS" + && spell != "Q_FLAGS" && spell != "Q_DECLARE_FLAGS"){ +#endif + if (Macro *m = env->resolve(spell)) { + if (! m->isFunctionLike()) { + if (0 == (m = processObjectLikeMacro(identifierToken, spell, m))) + continue; - // the macro expansion generated something that looks like - // a function-like macro. - } + // the macro expansion generated something that looks like + // a function-like macro. + } - // `m' is function-like macro. - if (_dot->is(T_LPAREN)) { - QVector<MacroArgumentReference> actuals; - collectActualArguments(&actuals); + // `m' is function-like macro. + if (_dot->is(T_LPAREN)) { + QVector<MacroArgumentReference> actuals; + collectActualArguments(&actuals); - if (_dot->is(T_RPAREN)) { - expandFunctionLikeMacro(identifierToken, m, actuals); - continue; + if (_dot->is(T_RPAREN)) { + expandFunctionLikeMacro(identifierToken, m, actuals); + continue; + } } } +#ifdef ICHECK_BUILD } - +#endif // it's not a function or object-like macro. out(spell); } |