[all-commits] [llvm/llvm-project] d19d7e: [clang][StaticAnalyzer] Add support for variables ...

Ziqing Luo via All-commits all-commits at lists.llvm.org
Tue Aug 4 17:07:00 PDT 2026


  Branch: refs/heads/users/ziqingluo/PR-183700416
  Home:   https://github.com/llvm/llvm-project
  Commit: d19d7e824b57f3fa54e34153b85b6b8eddc08687
      https://github.com/llvm/llvm-project/commit/d19d7e824b57f3fa54e34153b85b6b8eddc08687
  Author: Ziqing Luo <ziqing_luo at apple.com>
  Date:   2026-08-04 (Tue, 04 Aug 2026)

  Changed paths:
    M clang/lib/Analysis/IssueHash.cpp
    M clang/lib/StaticAnalyzer/Checkers/WebKit/RawPtrRefLocalVarsChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/WebKit/RawPtrRefMemberChecker.cpp
    A clang/test/Analysis/Checkers/WebKit/html-diag-dedup-ivars.mm
    A clang/test/Analysis/Checkers/WebKit/html-diag-dedup-local-vars.cpp
    A clang/test/Analysis/Checkers/WebKit/html-diag-dedup-members.cpp
    A clang/test/Analysis/Checkers/WebKit/html-diag-dedup-parameters.cpp

  Log Message:
  -----------
  [clang][StaticAnalyzer] Add support for variables and fields in GetEnclosingDeclContextSignature

Function `getIssueHash` relies on the name of the enclosing
declaration of the issue Decl for hashing. But the underlying
function `GetEnclosingDeclContextSignature` does not compute the
enclosing declaration for variables or fields, causing missing HTML
reports despite text warnings being printed.

The added
`clang/test/Analysis/Checkers/WebKit/html-diag-dedup-members.cpp`
example is a reproducer of this kind of issue we observed in WebKit.

Also, `RawPtrRefLocalVarsChecker` and `RawPtrRefMemberChecker` never
called `Report->setDeclWithIssue()`. This commit fixes it.

rdar://183700416

Assisted-by: Claude sonnet



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