[cfe-commits] [Patch] Fix for PR2709

Erik Verbruggen erikjv at me.com
Fri Dec 2 05:03:34 PST 2011


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).

-- Erik.



More information about the cfe-commits mailing list