diff --git a/src/libs/cplusplus/pp-engine.cpp b/src/libs/cplusplus/pp-engine.cpp
index 43e07619ddfc4354c205fbbfd88eeb09b673368b..350e6108001c07623dd899d2a48b5da2070524d9 100644
--- a/src/libs/cplusplus/pp-engine.cpp
+++ b/src/libs/cplusplus/pp-engine.cpp
@@ -694,8 +694,6 @@ void Preprocessor::preprocess(const QByteArray &fileName, const QByteArray &sour
                 _result->append("\\\n");
 
             else if (_dot->whitespace) {
-                TokenIterator begin = _tokens.constBegin();
-
                 const unsigned endOfPreviousToken = (_dot - 1)->end();
                 const unsigned beginOfToken = _dot->begin();
 
@@ -814,26 +812,10 @@ void Preprocessor::preprocess(const QByteArray &fileName, const QByteArray &sour
 
                     if (_dot->isNot(T_RPAREN)) {
                         // ### warning expected T_RPAREN
-
-                    } else {
-                        const char *beginOfText = startOfToken(*identifierToken);
-                        const char *endOfText = endOfToken(*_dot);
-                        ++_dot; // skip T_RPAREN
-
-                        if (client) {
-                            const QByteArray text =
-                                    QByteArray::fromRawData(beginOfText,
-                                                            endOfText - beginOfText);
-
-                            client->startExpandingMacro(identifierToken->offset,
-                                                        *m, text);
-                        }
-
-                        expand(beginOfText, endOfText, _result);
-
-                        if (client)
-                            client->stopExpandingMacro(_dot->offset, *m);
                     }
+
+                    else
+                        expandFunctionLikeMacro(identifierToken, m);
                 }
             }
         }
@@ -846,6 +828,27 @@ void Preprocessor::preprocess(const QByteArray &fileName, const QByteArray &sour
     _result = previousResult;
 }
 
+void Preprocessor::expandFunctionLikeMacro(TokenIterator identifierToken, Macro *m)
+{
+    const char *beginOfText = startOfToken(*identifierToken);
+    const char *endOfText = endOfToken(*_dot);
+    ++_dot; // skip T_RPAREN
+
+    if (client) {
+        const QByteArray text =
+                QByteArray::fromRawData(beginOfText,
+                                        endOfText - beginOfText);
+
+        client->startExpandingMacro(identifierToken->offset,
+                                    *m, text);
+    }
+
+    expand(beginOfText, endOfText, _result);
+
+    if (client)
+        client->stopExpandingMacro(_dot->offset, *m);
+}
+
 const char *Preprocessor::startOfToken(const Token &token) const
 { return _source.constBegin() + token.begin(); }
 
diff --git a/src/libs/cplusplus/pp-engine.h b/src/libs/cplusplus/pp-engine.h
index cd5129a9096de4c738c9a5719e22514c9d665c9a..49f332186559b9b2ef703b39d2139b44278bff83 100644
--- a/src/libs/cplusplus/pp-engine.h
+++ b/src/libs/cplusplus/pp-engine.h
@@ -104,6 +104,7 @@ private:
     QByteArray expand(const QByteArray &source);
     void expand(const QByteArray &source, QByteArray *result);
     void expand(const char *first, const char *last, QByteArray *result);
+    void expandFunctionLikeMacro(TokenIterator identifierToken, Macro *m);
 
     void resetIfLevel();
     bool testIfLevel();