njames93 added inline comments.
================ 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 ---------------- aaron.ballman wrote: > 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? The nicest solution would be to change the OnStartOfTranslationUnit callback to pass the ASTContext. That way checks which require setup code like this don't need to register matchers. However this would be a breaking change. 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