[PATCH] D99194: [analyzer] Fix body farm for Obj-C++ properties
Valeriy Savchenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 6 11:06:14 PDT 2021
vsavchenko added inline comments.
================
Comment at: clang/lib/Analysis/BodyFarm.cpp:757
+ if (PI->getPropertyDecl()) {
+ Prop = PI->getPropertyDecl();
+ if (Prop->getGetterName() == MD->getSelector())
----------------
NoQ wrote:
> At this point `Prop` may contain a completely unrelated property decl. It doesn't necessarily correspond to the `IVar` or have the right name. We keep it after the end of the loop and use it later. This doesn't sound right.
It is actually intentional. To reuse that bit of code that used to be under `if(!IVar)` condition.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99194/new/
https://reviews.llvm.org/D99194
More information about the cfe-commits
mailing list