Don't expand object-like macro when preprocessing in fast-mode.

This commit is contained in:
Roberto Raggi
2009-07-09 17:52:31 +02:00
parent e0f550733e
commit d788306781

View File

@@ -818,6 +818,17 @@ void Preprocessor::preprocess(const QString &fileName, const QByteArray &source,
const QByteArray spell = tokenSpell(*identifierToken);
if (! _expandMacros) {
if (! env->isBuiltinMacro(spell)) {
Macro *m = env->resolve(spell);
if (m && ! m->isFunctionLike()) {
QByteArray expandedDefinition;
expandObjectLikeMacro(identifierToken, spell, m, &expandedDefinition);
if (expandedDefinition.trimmed().isEmpty()) {
out(QByteArray(spell.length(), ' '));
continue;
}
}
}
out(spell);
continue;
}