[cfe-commits] [Patch] Fix for PR2709

Douglas Gregor dgregor at apple.com
Fri Dec 2 07:10:17 PST 2011


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



More information about the cfe-commits mailing list