[analyzer] Support implicit parameter 'self' in path note
authorJan Korous <jkorous@apple.com>
Tue, 13 Sep 2022 21:45:45 +0000 (14:45 -0700)
committerJan Korous <jkorous@apple.com>
Thu, 22 Sep 2022 00:26:09 +0000 (17:26 -0700)
commit85d97aac80b8e7689a6d957441054aa817bbb192
treec81ba42768376ec2c09bf759437c9169403e4c25
parentba39a6e14a528a14ce2e10c49893a5a5e0e7a4a4
[analyzer] Support implicit parameter 'self' in path note

showBRParamDiagnostics assumed stores happen only via function parameters while that
can also happen via implicit parameters like 'self' or 'this'.
The regression test caused a failed assert in the original cast to ParmVarDecl.

Differential Revision: https://reviews.llvm.org/D133815
clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
clang/test/Analysis/path-notes-impl-param.m [new file with mode: 0644]