================
@@ -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().SetDisableMacroExpansion();
----------------
jmmartinez wrote:
It was quite shortsighted from me, sorry. There were some subclasses that were
missing the call to the base-class method.
I should add the calls to the base class in a separate NFC patch.
I've added a `SetEnableMacroExpansion(true/false)` method to set/reset the
macro expansion; but I'm not convinced by it (I'm worried about interactions
with `SetMacroExpansionOnlyInDirectives`, but these interactions also seem
unlikely).
https://github.com/llvm/llvm-project/pull/137665
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits