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

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: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
Reviewed-by: default avatarhjk <qthjk@ovi.com>
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;
......
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