[PATCH] D118520: [clang-tidy] Output currently processing check and nodes on crash

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 2 02:52:02 PST 2022


njames93 added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h:239
+                              const ast_matchers::BoundNodes &Result) const {
+    if (CurrentlyProcessing)
+      CurrentlyProcessing->onProcessingCheckStart(CheckName, Result);
----------------
LegalizeAdulthood wrote:
> We repeat this `if (CurrentlyProcessing)` fragment 3 times...
> Maybe initializing to a Null Object would be better?
I don't think thats an improvement, as if we aren't in a context where the stack trace would be emitted, we don't want to be storing the state on each match.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118520



More information about the cfe-commits mailing list