================
@@ -88,12 +91,14 @@ void 
RedundantInlineSpecifierCheck::registerMatchers(MatchFinder *Finder) {
         this);
 
   if (getLangOpts().CPlusPlus17) {
-    Finder->addMatcher(
-        varDecl(isInlineSpecified(),
-                anyOf(isInternalLinkage(StrictMode),
-                      allOf(isConstexpr(), hasAncestor(recordDecl()))))
-            .bind("var_decl"),
-        this);
+    const auto IsPartOfRecordDecl = hasAncestor(recordDecl());
+    Finder->addMatcher(varDecl(isInlineSpecified(),
+                               anyOf(allOf(isInternalLinkage(StrictMode),
+                                           unless(allOf(hasInitialization(),
----------------
PiotrZSL wrote:

Would be nice to verify that those variables are actually static with for 
example: isStaticStorageClass

https://github.com/llvm/llvm-project/pull/81423
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to