r195910 - InclusionRewriter: Avoid duplicated BOM check
Reid Kleckner
rnk at google.com
Tue Dec 3 15:01:33 PST 2013
Ignore me, I wasn't reading this right. This just initializes the lexer
and gets the current location. I thought it lexed to the first token or
something, which it does not.
On Tue, Dec 3, 2013 at 2:26 PM, Lubos Lunak <l.lunak at centrum.cz> wrote:
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131203/f1ded3bc/attachment.html>
More information about the cfe-commits
mailing list