summaryrefslogtreecommitdiff
path: root/src/libs/cplusplus/pp-engine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/cplusplus/pp-engine.cpp')
-rw-r--r--src/libs/cplusplus/pp-engine.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libs/cplusplus/pp-engine.cpp b/src/libs/cplusplus/pp-engine.cpp
index e14a7e93b8..3f94652ee6 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;