Commit cd6b440a authored by Leandro Melo's avatar Leandro Melo Committed by hjk
Browse files

C++: Fine tune behavior of "expand macros" flag

Even if "expand funcion-like macros" is unset we still
perform the expansion in the case it's already doing
so - when it originally started from an object-like macro.

Task-number: QTCREATORBUG-7712
Change-Id: Ie2a24de227f757d195146477d48246472082d28a
Reviewed-by: default avatarOrgad Shaneh <>
Reviewed-by: default avatarhjk <>
parent 69697c5a
......@@ -810,8 +810,11 @@ bool Preprocessor::handleIdentifier(PPToken *tk)
PPToken oldMarkerTk;
if (macro->isFunctionLike()) {
if (!expandFunctionlikeMacros())
if (!expandFunctionlikeMacros()
// Still expand if this originally started with an object-like macro.
&& m_state.m_expansionStatus != Expanding) {
return false;
// Collect individual tokens that form the macro arguments.
QVector<QVector<PPToken> > allArgTks;
Supports Markdown
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