[cfe-commits] [PATCH] Correct first-line indentation in preprocessor output

Hal Finkel hfinkel at anl.gov
Sun Jan 27 20:38:35 PST 2013


----- Original Message -----
> From: "Jordan Rose" <jordan_rose at apple.com>
> To: "Hal Finkel" <hfinkel at anl.gov>
> Cc: "Eli Friedman" <eli.friedman at gmail.com>, "llvm cfe" <cfe-commits at cs.uiuc.edu>
> Sent: Thursday, January 24, 2013 7:48:19 PM
> Subject: Re: [cfe-commits] [PATCH] Correct first-line indentation in preprocessor output
> 
> 
> On Jan 24, 2013, at 17:07 , Hal Finkel <hfinkel at anl.gov> wrote:
> 
> > ----- Original Message -----
> >> From: "Jordan Rose" <jordan_rose at apple.com>
> >> To: "Hal Finkel" <hfinkel at anl.gov>
> >> Cc: "Eli Friedman" <eli.friedman at gmail.com>, "llvm cfe"
> >> <cfe-commits at cs.uiuc.edu>
> >> Sent: Thursday, January 24, 2013 11:55:20 AM
> >> Subject: Re: [cfe-commits] [PATCH] Correct first-line indentation
> >> in preprocessor output
> >> 
> >> Hm. If this is the change we go with, there should definitiely be
> >> a
> >> comment saying that MoveToLine(SourceLocation) returns a different
> >> value than MoveToLine(unsigned). That, or they should be changed
> >> to
> >> be consistent.
> > 
> > Good point.
> > 
> >> 
> >> (My first inclination was to change
> >> PrintPPOutputPPCallbacks::HandleFirstTokOnLine, and keep the
> >> current
> >> semantics of MoveToLine, but then you'd have to call
> >> getPresumedLoc
> >> again. Or not use the convenience wrapper for MoveToLine. But it's
> >> probably okay since, as Eli pointed out, this is the only consumer
> >> of the return value.)
> > 
> > Exactly.
> > 
> >> 
> >> Also, you should probably add a ^ to your {{       }} in your test
> >> case, just to make things stricter/easier for FileCheck.
> > 
> > Done.
> > 
> > Revised patch attached. How's this?
> > 
> > Thanks again,
> > Hal
> 
> It's not exactly an area of the compiler I own, but it seems harmless
> enough and does fix an issue, so go ahead. If someone else has a
> stronger opinion on how to deal with MoveToLine it can be changed
> after the fact.

r173657. Thanks!

 -Hal

> 
> Jordan
> 
> 



More information about the cfe-commits mailing list