diff options
author | Leandro Melo <[email protected]> | 2012-09-11 14:18:24 +0200 |
---|---|---|
committer | hjk <[email protected]> | 2012-09-11 17:05:10 +0200 |
commit | cd6b440a18552770ce36f32a02b9f15c736007f0 (patch) | |
tree | 60629a1edd767a18630ebff1d941050e8f4485bb /src/libs/cplusplus/pp-engine.cpp | |
parent | 69697c5affc51dd0118d0b51e9549c6b1232e02f (diff) |
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 <[email protected]>
Reviewed-by: hjk <[email protected]>
Diffstat (limited to 'src/libs/cplusplus/pp-engine.cpp')
-rw-r--r-- | src/libs/cplusplus/pp-engine.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libs/cplusplus/pp-engine.cpp b/src/libs/cplusplus/pp-engine.cpp index e14a7e93b8a..3f94652ee66 100644 --- a/src/libs/cplusplus/pp-engine.cpp +++ b/src/libs/cplusplus/pp-engine.cpp @@ -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; |