[clang-tools-extra] [clang-tidy][NFC] optimize unused using decls performance (PR #110200)

Congcong Cai via cfe-commits cfe-commits at lists.llvm.org
Sat Sep 28 06:18:04 PDT 2024


================
@@ -25,6 +25,13 @@ AST_MATCHER_P(DeducedTemplateSpecializationType, refsToTemplatedDecl,
   return false;
 }
 
+AST_MATCHER_P(Type, getTagDecl, clang::ast_matchers::internal::Matcher<TagDecl>,
+              DeclMatcher) {
+  if (const auto *ND = Node.getAsTagDecl())
----------------
HerrCai0907 wrote:

```suggestion
  if (const TagDecl *ND = Node.getAsTagDecl())
```

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


More information about the cfe-commits mailing list