aaron.ballman added a comment.

Thanks for the cleanup, I like the direction this is heading. But is this 
actually NFC? I thought using a `CallGraph` would change the behavior in code 
like:

  if (false) { // Statically known never to take this branch
    bad_call(); // Used to diagnose, does it still?
  }

but I could be remembering incorrectly.



================
Comment at: clang-tools-extra/clang-tidy/bugprone/SignalHandlerCheck.cpp:131
+  if (const auto *TU = Result.Nodes.getNodeAs<TranslationUnitDecl>("TU")) {
+    // Call graph must be populated with the entire TU at the begin.
+    // (It is possible to add a single function but the functions called from 
it
----------------
Should we also assert that this matcher is triggered before any other matcher 
is matched?

Alternatively, instead of matching on the TU decl itself, would it make sense 
to walk the decl contexts up to the TU level on the first match?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118016

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to