[PATCH] D118016: [clang-tidy] Change code of SignalHandlerCheck (NFC).

2022-01-25 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG9d8c3ad94fad: [clang-tidy] Change code of SignalHandlerCheck (NFC). (authored by balazske). Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D118016: [clang-tidy] Change code of SignalHandlerCheck (NFC).

2022-01-25 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 402881. balazske marked an inline comment as done. balazske added a comment. Corrected a comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118016/new/ https://reviews.llvm.org/D118016 Files: clang-tool

[PATCH] D118016: [clang-tidy] Change code of SignalHandlerCheck (NFC).

2022-01-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM aside from a commenting nit. Thanks! Comment at: clang-tools-extra/clang-tidy/bugprone/SignalHandlerCheck.cpp:136 + if (CG.size() <= 1) { +// Call gra

[PATCH] D118016: [clang-tidy] Change code of SignalHandlerCheck (NFC).

2022-01-25 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked 2 inline comments as done. balazske added a comment. The `CallGraph` just scans for `FunctionDecl` and `CallExpr`, no check for unreachable code is there. Comment at: clang-tools-extra/clang-tidy/bugprone/SignalHandlerCheck.cpp:131 + if (const auto *TU = Resul

[PATCH] D118016: [clang-tidy] Change code of SignalHandlerCheck (NFC).

2022-01-25 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 402832. balazske added a comment. Added tests to check more specific behavior. Removed AST matcher of TU. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118016/new/ https://reviews.llvm.org/D118016 Files: cl

[PATCH] D118016: [clang-tidy] Change code of SignalHandlerCheck (NFC).

2022-01-24 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SignalHandlerCheck.cpp:131 + if (const auto *TU = Result.Nodes.getNodeAs("TU")) { +// Call graph must be populated with the entire TU at the begin. +// (It is possible to add a single funct

[PATCH] D118016: [clang-tidy] Change code of SignalHandlerCheck (NFC).

2022-01-24 Thread Aaron Ballman via Phabricator via cfe-commits
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

[PATCH] D118016: [clang-tidy] Change code of SignalHandlerCheck (NFC).

2022-01-24 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. The plan is to take over functionality from D91164 , D97960 and D33825 after this change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://re

[PATCH] D118016: [clang-tidy] Change code of SignalHandlerCheck (NFC).

2022-01-23 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: carlosgalvezp, steakhal, martong, gamesh411, Szelethus, dkrupp, xazax.hun. balazske requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Using clang::CallGraph to get the cal