[clang] [alpha.webkit.UncountedLocalVarsChecker] Detect assignments to uncounted local variable and parameters. (PR #92639)
Artem Dergachev via cfe-commits
cfe-commits at lists.llvm.org
Thu May 23 17:28:53 PDT 2024
================
@@ -135,7 +135,19 @@ class UncountedLocalVarsChecker
bool shouldVisitImplicitCode() const { return false; }
bool VisitVarDecl(VarDecl *V) {
- Checker->visitVarDecl(V);
+ auto *Init = V->getInit();
+ if (Init && V->isLocalVarDecl())
----------------
haoNoQ wrote:
This method says "yes" to static locals. Are we ok with that?
(These methods are super confusing so I'd rather double-check.)
https://github.com/llvm/llvm-project/pull/92639
More information about the cfe-commits
mailing list