[PATCH] PR15614 : -frewrite-includes causes -Wunused-macros false positives #2

Richard Smith richard at metafoo.co.uk
Sat Apr 12 18:08:37 PDT 2014


On Fri, Apr 4, 2014 at 3:47 AM, Lubos Lunak <l.lunak at centrum.cz> wrote:

>
>  This is a re-send of
>
> http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20131125/094231.html
> which went without any answer.
>
>  See PR15614 for a testcase.


The combination of -Wunused-macro and -frewrite-includes still doesn't
really work with this patch applied: if the only use of a macro is within a
preprocessor directive that -frewrite-includes expands, we'll still warn
about it. Unfortunately I don't have any great ideas as to how to solve
this; the least bad idea I have is to add a '#pragma clang macro_used
BLAH', and emit that for each macro that's used in the -frewrite-includes
run.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140412/01517e06/attachment.html>


More information about the cfe-commits mailing list