Douglas Gregor | 4038cf4 | 2010-06-08 17:35:15 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
| 2 | |
| 3 | int* j = false; // expected-warning{{ initialization of pointer of type 'int *' from literal 'false'}} |
| 4 | |
| 5 | void foo(int* i, int *j=(false)) // expected-warning{{ initialization of pointer of type 'int *' from literal 'false'}} |
| 6 | { |
| 7 | foo(false); // expected-warning{{ initialization of pointer of type 'int *' from literal 'false'}} |
Argyrios Kyrtzidis | d6ea6bd | 2010-09-28 14:54:11 +0000 | [diff] [blame] | 8 | foo((int*)false); |
Douglas Gregor | 4038cf4 | 2010-06-08 17:35:15 +0000 | [diff] [blame] | 9 | } |
| 10 | |