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: unassignedclangb...@nondot.org
          Reporter: alexandre.ga...@ubisoft.com
                CC: blitzrak...@gmail.com, dblai...@gmail.com,
                    dgre...@apple.com, erik.pilking...@gmail.com,
                    llvm-bugs@lists.llvm.org, richard-l...@metafoo.co.uk

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
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to