[clang-tools-extra] [clang-tidy] fix false positive in cppcoreguidelines-missing-std-forward (PR #77056)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 5 07:05:28 PST 2024
================
@@ -53,18 +53,76 @@ AST_MATCHER(ParmVarDecl, isTemplateTypeParameter) {
FuncTemplate->getTemplateParameters()->getDepth();
}
+AST_MATCHER_P(NamedDecl, hasSameNameAsBoundNode, std::string, BindingID) {
+ const auto &Name = Node.getNameAsString();
+
+ return Builder->removeBindings(
+ [this, Name](const ast_matchers::internal::BoundNodesMap &Nodes) {
+ const auto &BN = Nodes.getNode(this->BindingID);
----------------
EugeneZelenko wrote:
Please don't use `auto` unless type u=is explicitly stated in same statement or iterator.
https://github.com/llvm/llvm-project/pull/77056
More information about the cfe-commits
mailing list