aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/cplusplus/FastPreprocessor.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2025-04-07 16:42:59 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2025-04-09 14:32:34 +0000
commitb419f638ecdec1e39f94c632065d73eddf3399dc (patch)
tree0d090b6751c29409cb01536953f45cc00b3aabd9 /src/libs/cplusplus/FastPreprocessor.cpp
parentc257f7dffc420d4e2d4578a2bfc821b2c90f9e9d (diff)
CPlusPlus: Do not skip function-like macro expansion in FastPreprocessor
Originally, macro expansion was disabled entirely in 2f649be1464e1ba6857f28cfb6c362f8fb0a8ca4, which was reverted for non- function-like macros in 605acda9ae751f31b68f5416077410a22555c3c0. Now we revert it entirely, as it clearly yields incorrect results. Note that FastPreprocessor is used in e.g. the central function Snapshot::preprocessedDocument(), so we cannot be sloppy there. I don't know how "fast" the FastPreprocessor still is after that, nor what was its intention in the first place, as there is no documentation whatsoever. Fixes: QTCREATORBUG-32598 Change-Id: If2da1dea89a74f619692eb46c3484cf970c06e55 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/libs/cplusplus/FastPreprocessor.cpp')
-rw-r--r--src/libs/cplusplus/FastPreprocessor.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/libs/cplusplus/FastPreprocessor.cpp b/src/libs/cplusplus/FastPreprocessor.cpp
index c98b04c61d2..c3660c606f1 100644
--- a/src/libs/cplusplus/FastPreprocessor.cpp
+++ b/src/libs/cplusplus/FastPreprocessor.cpp
@@ -27,7 +27,6 @@ QByteArray FastPreprocessor::run(Document::Ptr newDoc,
_addIncludesToCurrentDoc = _currentDoc->resolvedIncludes().isEmpty()
&& _currentDoc->unresolvedIncludes().isEmpty();
const FilePath filePath = _currentDoc->filePath();
- _preproc.setExpandFunctionlikeMacros(false);
_preproc.setKeepComments(true);
if (Document::Ptr doc = _snapshot.document(filePath)) {