[llvm-bugs] [Bug 43174] New: -Wundefined-bool-conversion not raised when using macro

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Aug 29 20:02:29 PDT 2019


            Bug ID: 43174
           Summary: -Wundefined-bool-conversion not raised when using
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: alexandre.ganea at ubisoft.com
                CC: blitzrakete at gmail.com, dblaikie at gmail.com,
                    dgregor at apple.com, erik.pilkington at gmail.com,
                    llvm-bugs at lists.llvm.org, richard-llvm at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190830/12ca2331/attachment.html>

More information about the llvm-bugs mailing list