[clang-tools-extra] [clang-tidy] Add user-defined functions to `bugprone-unsafe-functions` check (PR #106350)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 29 03:50:50 PDT 2024
================
@@ -136,6 +128,15 @@ class MatchesAnyListedNameMatcher
}
};
+ bool matches(
+ const NamedDecl &Node, ast_matchers::internal::ASTMatchFinder *Finder,
+ ast_matchers::internal::BoundNodesTreeBuilder *Builder) const override {
+ return llvm::any_of(NameMatchers, [&Node](const NameMatcher &NM) {
+ return NM.match(Node);
+ });
+ }
+
+private:
----------------
Discookie wrote:
The diff here highlights the wrong part of the change:
https://github.com/llvm/llvm-project/pull/106350/commits/47c1a5694fed5769bb6bbc437e31276efe41d520
I made the contained NameMatcher class public, but the diff considered the other function to be moved.
https://github.com/llvm/llvm-project/pull/106350
More information about the cfe-commits
mailing list