[clang] [Preprocessor] Do not expand macros if the input is already preprocessed (PR #137665)
Juan Manuel Martinez CaamaƱo via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 16 04:36:29 PDT 2025
================
@@ -84,6 +84,8 @@ class FrontendAction {
/// \return True on success; on failure ExecutionAction() and
/// EndSourceFileAction() will not be called.
virtual bool BeginSourceFileAction(CompilerInstance &CI) {
+ if (CurrentInput.isPreprocessed())
+ CI.getPreprocessor().SetEnableMacroExpansion(false);
----------------
jmmartinez wrote:
Fixed in last commits.
https://github.com/llvm/llvm-project/pull/137665
More information about the cfe-commits
mailing list