[PATCH] D131632: [clang] Enable output of SARIF diagnostics
Christopher Di Bella via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 25 15:01:31 PDT 2022
cjdb added inline comments.
================
Comment at: clang/lib/Frontend/SARIFDiagnosticPrinter.cpp:53
+ OS.flush();
+}
+
----------------
aaron.ballman wrote:
> Should we be invalidating that `SARIFDiag` object here so the printer cannot be used after the source file has ended?
I suggested that we don't do this, because the next run of `BeginSourceFile` can take care of that when making the new `SARIFDiagnostic`. However, if we were to put an assert at the top of every member function other than `BeginSourceFile` to ensure that SARIFDiag isn't null (and one at the top of `BeginSourceFile` to ensure that it _is_), I think there might be good value in re-adding this.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131632/new/
https://reviews.llvm.org/D131632
More information about the cfe-commits
mailing list