[cfe-commits] [PATCH] PR6101: Preprocessor doesn't honor #line directives

Chris Lattner clattner at apple.com
Mon Apr 12 21:33:20 PDT 2010

On Apr 12, 2010, at 9:12 PM, Jordy Rose wrote:
> If !IsLineDirective (either of those cases), adding 1 to UserLoc.getLine()
> is incorrect -- we're actually entering or exiting a file instead of just
> reading a directive. Special-casing the main file isn't correct either; it
> also affects #includes.
> I certainly don't like these contortions, but without adding an
> IsLineDirective parameter to the method, I'm not sure if there's a better
> way.

Is it possible to change the linemarker code to pass in the right location?  I tried for a couple hours and couldn't get it right... I stopped caring, and decided that this was a big enough improvement in the status quo :)


More information about the cfe-commits mailing list