forked from qt-creator/qt-creator
		
	Don't expand object-like macro when preprocessing in fast-mode.
This commit is contained in:
		| @@ -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; | ||||
|                 } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user