Merge ichecker branch changes into the mainline. New project can be found under src/tools/ICheck

This commit is contained in:
Wolfgang Beck
2010-01-19 15:26:08 +10:00
parent 29b7594b38
commit 4b33881729
33 changed files with 2915 additions and 93 deletions

View File

@@ -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);
}