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

            Bug ID: 40264
           Summary: Doesn't warn about the unused variable
           Product: clang
           Version: 7.0
          Hardware: PC
                OS: FreeBSD
            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]

In this code

---begin test.cpp---
bool x(bool y) {
  return !y;
}

void f() {
  bool b = false;
  b |= x(false);
  b |= x(true);
}
---end test.cpp---

the variable 'b' in 'f' is computed but isn't used, but clang++70 doesn't warn
about this when -Wall is set.

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

Reply via email to