[clang-tools-extra] [clang-tidy] Removed redundant-inline-specifier warning on static data members (PR #81423)

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Sun Feb 11 12:47:47 PST 2024


================
@@ -47,6 +47,9 @@ AST_POLYMORPHIC_MATCHER_P(isInternalLinkage,
     return VD->isInAnonymousNamespace();
   llvm_unreachable("Not a valid polymorphic type");
 }
+
+AST_MATCHER(clang::VarDecl, hasInitialization) { return Node.hasInit(); }
----------------
PiotrZSL wrote:

why not use `hasInitializer(expr())` instead of adding next matcher.




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


More information about the cfe-commits mailing list