[clang-tools-extra] [clang] [clang-tidy] Added new check to detect redundant inline keyword (PR #73069)

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 22 02:43:32 PST 2023


=?utf-8?q?Félix-Antoine?= Constantin
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/73069 at github.com>


================
@@ -7889,7 +7889,7 @@ AST_POLYMORPHIC_MATCHER(isInline, AST_POLYMORPHIC_SUPPORTED_TYPES(NamespaceDecl,
   if (const auto *NSD = dyn_cast<NamespaceDecl>(&Node))
     return NSD->isInline();
   if (const auto *VD = dyn_cast<VarDecl>(&Node))
-    return VD->isInline();
+    return VD->isInlineSpecified();
----------------
PiotrZSL wrote:

Do not change this, this may impact other checks...
Instead simply introduce local matcher isInlineSpecified.

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


More information about the cfe-commits mailing list