[cfe-commits] [Patch] Fix for PR2709
Erik Verbruggen
erikjv at me.com
Mon Dec 5 03:35:43 PST 2011
On 2-12-11 16:10, Douglas Gregor wrote:
>
> On Dec 2, 2011, at 5:03 AM, Erik Verbruggen wrote:
>
>> On 1-12-11 17:19, Douglas Gregor wrote:
>>> I'd prefer this solution, which just asks Sema whether we're already inside an ObjC container. Then the parser will handle recovery for what is essentially a parsing issue, calling Sema's ActOnAtEnd and producing the error/Fix-It.
>>
>> Nearly done, just one thing left. Considering this snippet:
>>
>> @interface A
>> -(void) im0;
>>
>> @implementation A
>> @end
>>
>> The fix-it is clearly an "insert @end before @implementation". But should the error be attached to the @interface or the @implementation? I have a slight preference for the @interface: if the last @end was missing, there would be 2 fix-its on the @implementation (one for the interface, and the other because there is just no token after that line).
>
>
> The error should go on the @implementation, with a note pointing to the @interface.
>
> - Doug
Attached is the reworked patch.
-- Erik
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-Extend-warnings-for-missing-end.patch
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111205/4b0ae73b/attachment.ksh>
More information about the cfe-commits
mailing list