r195910 - InclusionRewriter: Avoid duplicated BOM check

Lubos Lunak l.lunak at centrum.cz
Tue Dec 3 14:26:54 PST 2013


On Tuesday 03 of December 2013, Reid Kleckner wrote:
> On Tue, Dec 3, 2013 at 12:01 PM, Lubos Lunak <l.lunak at centrum.cz> wrote:
> > On Tuesday 03 of December 2013, Reid Kleckner wrote:
> > > This seems like it has the side effect of trimming leading whitespace
> >
> > from
> >
> > > the rewritten file, but that's probably fine.
> >
> >  It's not. The main file does not start with any line markers, so it is
> > possible that lines in warnings/errors will be wrong. Please fix this or
> > revert the change to the previous one that works.
>
> Alternatively, can we emit a #line directive if the line of the first token
> isn't on line 1?

 No, at least not without rewriting SourceManager::isFromMainFile() - 
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20131125/094236.html .

-- 
 Lubos Lunak



More information about the cfe-commits mailing list