From b419f638ecdec1e39f94c632065d73eddf3399dc Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 7 Apr 2025 16:42:59 +0200 Subject: 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 --- src/libs/cplusplus/FastPreprocessor.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src/libs/cplusplus/FastPreprocessor.cpp') 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)) { -- cgit v1.2.3