[clang-tools-extra] [clang-tidy] Fix some false negatives in `bugprone-throw-keyword-missing` (PR #173748)
Victor Chernyakin via cfe-commits
cfe-commits at lists.llvm.org
Sun Dec 28 03:41:37 PST 2025
================
@@ -11,24 +11,29 @@
#include "clang/ASTMatchers/ASTMatchFinder.h"
using namespace clang::ast_matchers;
+using namespace clang::ast_matchers::internal;
namespace clang::tidy::bugprone {
void ThrowKeywordMissingCheck::registerMatchers(MatchFinder *Finder) {
+ const VariadicDynCastAllOfMatcher<Stmt, AttributedStmt> AttributedStmt;
+ // Matches an 'expression-statement', as defined in [stmt.expr]/1.
+ // Not to be confused with the similarly-named GNU extension, the
+ // statement expression.
----------------
localspook wrote:
https://eel.is/c++draft/stmt.expr
https://github.com/llvm/llvm-project/pull/173748
More information about the cfe-commits
mailing list