[PATCH] D94476: [analyzer] Implement conversion from Clang diagnostics to PathDiagnostics.

Gábor Horváth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 12 07:52:56 PST 2021


xazax.hun added inline comments.


================
Comment at: clang/include/clang/Analysis/PathDiagnosticConverterDiagnosticConsumer.h:38
+
+  std::map<PathDiagnosticConsumer *, std::unique_ptr<PathDiagnostic>>
+      PartialPDs;
----------------
A pointer pair might be small enough for a DenseMap?


================
Comment at: clang/lib/Analysis/PathDiagnosticConverterDiagnosticConsumer.cpp:20
+void PathDiagnosticConverterDiagnosticConsumer::flushPartialDiagnostic() {
+  if (PartialPDs.empty())
+    return;
----------------
Do we need this early return? We might get the same behavior by simply omitting this check. I have no strong preference about keeping or removing it.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94476/new/

https://reviews.llvm.org/D94476



More information about the cfe-commits mailing list