Author: Benjamin Kramer Date: 2022-04-07T11:00:28+02:00 New Revision: 817df7999a71a5dbda0025b75612b54160fb5f9c
URL: https://github.com/llvm/llvm-project/commit/817df7999a71a5dbda0025b75612b54160fb5f9c DIFF: https://github.com/llvm/llvm-project/commit/817df7999a71a5dbda0025b75612b54160fb5f9c.diff LOG: [clang-tidy] Silence unused variable warning in release builds. NFCI. Added: Modified: clang-tools-extra/clang-tidy/bugprone/SignalHandlerCheck.cpp Removed: ################################################################################ diff --git a/clang-tools-extra/clang-tidy/bugprone/SignalHandlerCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/SignalHandlerCheck.cpp index 37d373905b693..dcc01589f1162 100644 --- a/clang-tools-extra/clang-tidy/bugprone/SignalHandlerCheck.cpp +++ b/clang-tools-extra/clang-tidy/bugprone/SignalHandlerCheck.cpp @@ -335,12 +335,11 @@ void SignalHandlerCheck::registerMatchers(MatchFinder *Finder) { } void SignalHandlerCheck::check(const MatchFinder::MatchResult &Result) { - const auto *SignalCall = Result.Nodes.getNodeAs<CallExpr>("register_call"); const auto *HandlerDecl = Result.Nodes.getNodeAs<FunctionDecl>("handler_decl"); const auto *HandlerExpr = Result.Nodes.getNodeAs<DeclRefExpr>("handler_expr"); - assert(SignalCall && HandlerDecl && HandlerExpr && - "All of these should exist in a match here."); + assert(Result.Nodes.getNodeAs<CallExpr>("register_call") && HandlerDecl && + HandlerExpr && "All of these should exist in a match here."); if (CG.size() <= 1) { // Call graph must be populated with the entire TU at the beginning. _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits