| // RUN: clang-cc -fsyntax-only -verify %s |
| do_something(X); // expected-warning{{'X' is always zero in this context}} |
| do_something(Y); // expected-warning{{'Y' is always zero in this context}} |
| if (bool B2 = B) { // expected-warning{{'B' is always false in this context}} |
| do_something(B); // expected-warning{{'B' is always false in this context}} |
| } else if (B2) { // expected-warning{{'B2' is always false in this context}} |
| do_something(B); // expected-warning{{'B' is always false in this context}} |
| do_something(B2); // expected-warning{{'B2' is always false in this context}} |
| return B; // expected-warning{{'B' is always false in this context}} |
| else if (int *P2 = get_ptr()) { |
| do_something(*P1); // expected-warning{{'P1' is always NULL in this context}} |
| do_something(*P1); // expected-warning{{'P1' is always NULL in this context}} |
| do_something(*P2); // expected-warning{{'P2' is always NULL in this context}} |