Commit d7883067 authored by Roberto Raggi's avatar Roberto Raggi

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

parent e0f55073
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment