[LLVMbugs] [Bug 23968] New: Wtautological-undefined-compare disabled with double-macros

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jun 26 15:01:08 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=23968

            Bug ID: 23968
           Summary: Wtautological-undefined-compare disabled with
                    double-macros
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: nlewycky at google.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Testcase:

#define NULL nullptr
#define MYIF(x) if (x) {}
struct X {};
void test(X &x) { MYIF(&x == NULL) }

with -std=c++11 should issue a warning, but doesn't. If you use 'nullptr' in
place of NULL directly, it does. If you write the if-stmt out instead of using
a macro for it, it does. But if you use two macros, it doesn't fire.

-- 
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/20150626/01790018/attachment.html>


More information about the llvm-bugs mailing list