[PATCH] D68108: Redeclare Objective-C property accessors inside the ObjCImplDecl in which they are synthesized.
Adrian Prantl via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 18 17:57:26 PDT 2019
aprantl marked 8 inline comments as done.
aprantl added inline comments.
================
Comment at: clang/lib/Analysis/BodyFarm.cpp:843
+ return Val.getValue();
+ Val = nullptr;
+
----------------
rjmccall wrote:
> Why did this logic need to change?
I don't have a satisfying answer for this.
Without this extra code, the assertion in https://github.com/llvm/llvm-project/blob/b081220cfd46965fa25dbf826cd3f42f4f9e54cd/clang/test/Analysis/properties.m#L1035 (and only that one) turns from `UNKNOWN` to `TRUE`.
There is a similar workaround with a similar comment in
https://github.com/llvm/llvm-project/blob/b081220cfd46965fa25dbf826cd3f42f4f9e54cd/clang/lib/StaticAnalyzer/Core/CallEvent.cpp#L1291
that looks like it is related.
================
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:5063
const_cast<ObjCImplementationDecl *>(D), PID);
}
}
----------------
rjmccall wrote:
> Is this special treatment still necessary? Won't we encounter the getter and setter on the normal pass over the method definitions in the `@implementation`?
We don't know which ObjMethodDecls without bodies are property accessor implementations since there is no pointer from the ObjCMethodDecl back to the ObjCPropertyImplDecl.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68108/new/
https://reviews.llvm.org/D68108
More information about the cfe-commits
mailing list