aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/cplusplus/FastPreprocessor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/cplusplus/FastPreprocessor.cpp')
-rw-r--r--src/libs/cplusplus/FastPreprocessor.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libs/cplusplus/FastPreprocessor.cpp b/src/libs/cplusplus/FastPreprocessor.cpp
index c3660c606f1..b2fb0bfc58f 100644
--- a/src/libs/cplusplus/FastPreprocessor.cpp
+++ b/src/libs/cplusplus/FastPreprocessor.cpp
@@ -13,10 +13,9 @@
using namespace Utils;
using namespace CPlusPlus;
-FastPreprocessor::FastPreprocessor(const Snapshot &snapshot)
+FastPreprocessor::FastPreprocessor(const Snapshot &snapshot, bool expandFunctionLikeMacros)
: _snapshot(snapshot)
- , _preproc(this, &_env)
- , _addIncludesToCurrentDoc(false)
+ , _expandFunctionLikeMacros(expandFunctionLikeMacros)
{ }
QByteArray FastPreprocessor::run(Document::Ptr newDoc,
@@ -28,6 +27,7 @@ QByteArray FastPreprocessor::run(Document::Ptr newDoc,
&& _currentDoc->unresolvedIncludes().isEmpty();
const FilePath filePath = _currentDoc->filePath();
_preproc.setKeepComments(true);
+ _preproc.setExpandFunctionlikeMacros(_expandFunctionLikeMacros);
if (Document::Ptr doc = _snapshot.document(filePath)) {
_merged.insert(filePath);