================
@@ -702,6 +704,10 @@ ParsedAST::build(llvm::StringRef Filename, const 
ParseInputs &Inputs,
     log("Execute() failed when building AST for {0}: {1}", MainInput.getFile(),
         toString(std::move(Err)));
 
+  // Disable the macro collector for the remainder of this function, e.g.
+  // clang-tidy checkers.
+  MacroCollectorPtr->doneParse();
----------------
kadircet wrote:

> add a new method to PPCallbacks, e.g. BuildASTDone() or such

I'd first see if we can extend existing `(Lexed)FileChanged` callbacks to fit 
this use case without breaking any users.

but if that doesn't work, yes, a new callback would be needed.

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

Reply via email to