[PATCH] D115106: [clang-tidy] Fix `readability-static-accessed-through-instance` false negative for static methods
Simon Giesecke via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 6 02:36:18 PST 2021
simon.giesecke added a comment.
Thanks a lot for addressing this issue! I am just trying it on our codebase.
> The problem actually has nothing to do with the out-of-line definition being inline; the problem is that hasDeclaration() of the memberExpr() will match the out-of-line definition, which obviously isn't marked static, so isStaticStorageClass() won't match.
Hm, an out-of-line definition *cannot* have the `static` keyword. I wonder if it's actually a bug (in the AST? or just the matcher?) that `isStaticStorageClass` doesn't match here? I guess that other checks that use `isStaticStorageClass` might be affected by this too?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115106/new/
https://reviews.llvm.org/D115106
More information about the cfe-commits
mailing list