[clang-tools-extra] [clang-tidy] fix false positive in cppcoreguidelines-missing-std-forward (PR #77056)

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 5 04:59:56 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();
----------------
PiotrZSL wrote:

getNameAsString looks to be deprecated, use getName or even better getIdentifier()->getName() and check that getIdentifier is not null

https://github.com/llvm/llvm-project/pull/77056


More information about the cfe-commits mailing list