[all-commits] [llvm/llvm-project] 88dcdc: [alpha.webkit.UncountedLocalVarsChecker] Don't tre...

Fady Farag via All-commits all-commits at lists.llvm.org
Tue Sep 22 14:57:07 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 88dcdc2d619dd09665beb67479a330c36f7251b7
      https://github.com/llvm/llvm-project/commit/88dcdc2d619dd09665beb67479a330c36f7251b7
  Author: Fady Farag <com.webkit.iidmsa at gmail.com>
  Date:   2026-09-22 (Tue, 22 Sep 2026)

  Changed paths:
    M clang/lib/StaticAnalyzer/Checkers/WebKit/RawPtrRefLocalVarsChecker.cpp
    M clang/test/Analysis/Checkers/WebKit/uncounted-local-vars.cpp

  Log Message:
  -----------
  [alpha.webkit.UncountedLocalVarsChecker] Don't treat a call through a raw pointer/reference guardian argument as a mutation (#225309)

Previously, when a function parameter was used as the guardian of a raw
pointer/reference local, `GuardianVisitor` treated any non-const member
function call on the parameter, or passing it to a non-const parameter,
as a mutation. That is correct for a `RefPtr<T>&` parameter but not for
a raw pointer/reference parameter, where such a call operates on the
pointee and cannot change the parameter, which caused an unnecessary
warning whenever the parameter was used at all. This only treats a raw
pointer/reference guardian argument as mutated when it is assigned to,
or when the callee can reseat it by receiving it as `Bar*&` or `Bar**`.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list