================
@@ -4628,6 +4628,12 @@ ASTFileSignature ASTWriter::WriteAST(Sema &SemaRef, 
StringRef OutputFile,
   WritingAST = true;
 
   ASTHasCompilerErrors = hasErrors;
+  bool trueHasErrors = 
SemaRef.PP.getDiagnostics().hasUncompilableErrorOccurred();
----------------
shafik wrote:

So this logic seems wrong. You are on one hand asserting `ASTHasCompilerErrors 
== trueHasErrors` and yet checking if they are not equal.


Is `getDiagnostics().hasUncompilableErrorOccurred()` in `ASTUnit::serialize` 
not the same as `SemaRef.PP.getDiagnostics().hasUncompilableErrorOccurred()`? 


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

Reply via email to