[llvm] [clang] [lld] [LTO] Improve diagnostics handling when parsing module-level inline assembly (PR #75726)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 18 14:47:32 PST 2023


================
@@ -418,6 +418,8 @@ void BackendConsumer::anchor() { }
 } // namespace clang
 
 bool ClangDiagnosticHandler::handleDiagnostics(const DiagnosticInfo &DI) {
+  if (DI.getSeverity() == DS_Error)
+    HasErrors = true;
----------------
efriedma-quic wrote:

I'm not sure I like the way the "HasErrors" bit works... can we refactor so every diagnostic handler doesn't need its own code to set the HasErrors bits?  The way this is written, it looks like every LLVM-based compiler needs some code for this, not just clang.

https://github.com/llvm/llvm-project/pull/75726


More information about the cfe-commits mailing list