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

            Bug ID: 43174
           Summary: -Wundefined-bool-conversion not raised when using
                    macro
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected], [email protected]

The following snippet does not raise -Wundefined-bool-conversion:

// compile with: clang a.cpp -std=c++17 -Wall -O0

class A {} a;
A& g = a;

#define g_A &g

int main() {
  if (g_A) // replacing by &g raises -Wundefined-bool-conversion
    return 1;
  return 0;
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to