[clang-tools-extra] [clang-tidy] Fix false positives in `readability-redundant-inline-specifier` (PR #135391)
Piotr Zegar via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 11 14:11:25 PDT 2025
=?utf-8?q?Björn?= Svensson <bjorn.a.svensson at est.tech>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/135391 at github.com>
================
@@ -72,11 +72,13 @@ static SourceLocation getInlineTokenLocation(SourceRange RangeLocation,
}
void RedundantInlineSpecifierCheck::registerMatchers(MatchFinder *Finder) {
+ const auto IsPartOfRecordDecl = hasAncestor(recordDecl());
----------------
PiotrZSL wrote:
Note: I wonder, maybe hasDeclContext should be used here instead of hasAncestor or just match cxxMethodDecl directly instead of functionDecl.
https://github.com/llvm/llvm-project/pull/135391
More information about the cfe-commits
mailing list