]> granicus.if.org Git - clang/commit
[analyzer] Prefer accessor method in extension over category in CallEvent.
authorDevin Coughlin <dcoughlin@apple.com>
Fri, 1 Apr 2016 03:24:13 +0000 (03:24 +0000)
committerDevin Coughlin <dcoughlin@apple.com>
Fri, 1 Apr 2016 03:24:13 +0000 (03:24 +0000)
commit9a9ef84ee01c50e33dd065bb549a030b79c61beb
treef40e6defd89a256bc22563d6553570df28ac2e0f
parent0e99eeaa87a88ba00689bba3c825fd3924ecd5e1
[analyzer] Prefer accessor method in extension over category in CallEvent.

In ObjCMethodCall:getRuntimeDefinition(), if the method is an accessor in a
category, and it doesn't have a self declaration, first try to find the method
in a class extension. This works around a bug in Sema where multiple accessors
are synthesized for properties in class extensions that are redeclared in a
category. The implicit parameters are not filled in for the method on the
category, which causes a crash when trying to synthesize a getter for the
property in BodyFarm. The Sema bug is tracked as rdar://problem/25481164.

rdar://problem/25056531

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@265103 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/CallEvent.cpp
test/Analysis/properties.m