================ @@ -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:
I also do not know such case. I were thinking more about future, maybe C++30 will add such thing. Other idea is simply to explicitly limit a matcher to that specific case. But for not that's not a must. 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