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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to