[PATCH] PR15610 : -Wunused-macros warns despite line markers

Lubos Lunak l.lunak at centrum.cz
Wed Nov 27 06:22:44 PST 2013


On Monday 01 of July 2013, Eli Friedman wrote:
> On Sat, Jun 29, 2013 at 11:59 PM, Lubos Lunak <l.lunak at suse.cz> wrote:
> >   Hello,
> >
> >  could somebody please review and commit the atached patch for pr15610?
> > Thank
> > you.
>
> Does this same issue apply to other users of
> Preprocessor::isInPrimaryFile() and/or SourceManager::isFromMainFile()?
>  (For example, Preprocessor::HandlePragmaOnce.)  If so, can you please add
> a common helper routine in SourceManager?

 I see you have fixed this meanwhile, but I've noticed that now 
isFromMainFile() is always false for any -frewrite-includes output, since it 
always writes out line markers even for entering the main file. This is not 
necessary and technically it's probably also wrong, so the attached patch 
should fix that. Ok to commit?

-- 
 Lubos Lunak
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-do-not-write-line-markers-for-main-file-in-frewrite-.patch
Type: text/x-diff
Size: 1743 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131127/212255f3/attachment.patch>


More information about the cfe-commits mailing list