================ @@ -4628,6 +4628,12 @@ ASTFileSignature ASTWriter::WriteAST(Sema &SemaRef, StringRef OutputFile, WritingAST = true; ASTHasCompilerErrors = hasErrors; + bool trueHasErrors = SemaRef.PP.getDiagnostics().hasUncompilableErrorOccurred(); ---------------- AaronBallman wrote:
I would rather fix this by disallowing the user from passing `hasErrors` as an argument at all. The only callers of this API are all passing the same thing: `PP.getDiagnostics().hasUncompilableErrorOccured()`, so let's remove the parameter and use this directly. This makes the interface more simple and it fixes the crash; WDYT? https://github.com/llvm/llvm-project/pull/68127 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits