================
@@ -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:

Use `SetMacroExpansionOnlyInDirectives` instead. We still need to expand macro 
ids in #pragma directives when going through preprocessed code. Usage of macros 
on #pragma directives are not expanded in the preprocessed source.

https://github.com/llvm/llvm-project/pull/137665
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to