[LLVMbugs] [Bug 15614] New: -frewrite-includes causes -Wunused-macros false positives

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Mar 27 14:59:39 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=15614

            Bug ID: 15614
           Summary: -frewrite-includes causes -Wunused-macros false
                    positives
           Product: clang
           Version: 3.2
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: l.lunak at suse.cz
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

$ cat a.cpp
#define FOO 1
int foo = FOO;

$ clang++ -Wunused-macros -E -frewrite-includes a.cpp
a.cpp:1:9: warning: macro is not used [-Wunused-macros]
#define FOO 1
        ^
# 1 "a.cpp" 1                                                                   
#define FOO 1
int foo = FOO;

1 warning generated.

The warning should not be emitted, just like other warnings are not emitted in
-frewrite-includes mode.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130327/903a540b/attachment.html>


More information about the llvm-bugs mailing list