[cfe-commits] r101810 - /cfe/trunk/lib/Sema/SemaExprObjC.cpp
Douglas Gregor
dgregor at apple.com
Mon Apr 19 14:08:03 PDT 2010
On Apr 19, 2010, at 1:59 PM, Fariborz Jahanian wrote:
>
> On Apr 19, 2010, at 1:09 PM, Douglas Gregor wrote:
>
>> Author: dgregor
>> Date: Mon Apr 19 15:09:36 2010
>> New Revision: 101810
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=101810&view=rev
>> Log:
>> When normal name lookup to disambiguiate an Objective-C message send
>> fails to find anything, perform ivar lookup and, if we find one,
>> consider this an instance message.
>
> A test case please. Presumably this is to match gcc's behavior.
Yes, it is to match GCC's behavior.
The tests in 101792 and 101803 check this behavior. Note that the only way I've found to detect this issue is when typo-correction tries to correct well-formed code. r101792 "fixed" the problem by making sure that typo correction sees synthesized ivars and doesn't make a bad suggestion. r101810 is the real fix, which checks whether we'll actually find a ivar. It's real role is as a performance optimization, avoiding the expense of typo correction for valid code.
- Doug
More information about the cfe-commits
mailing list