From 4ba675006b5a8edfc48b6a9bd3dcf54a70cc08f2 Mon Sep 17 00:00:00 2001 From: Roman Divacky Date: Tue, 13 Jul 2010 17:21:42 +0000 Subject: Update clang to r108243. --- test/SemaCXX/warn_false_to_pointer.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 test/SemaCXX/warn_false_to_pointer.cpp (limited to 'test/SemaCXX/warn_false_to_pointer.cpp') diff --git a/test/SemaCXX/warn_false_to_pointer.cpp b/test/SemaCXX/warn_false_to_pointer.cpp new file mode 100644 index 000000000000..3a873d886f0e --- /dev/null +++ b/test/SemaCXX/warn_false_to_pointer.cpp @@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +int* j = false; // expected-warning{{ initialization of pointer of type 'int *' from literal 'false'}} + +void foo(int* i, int *j=(false)) // expected-warning{{ initialization of pointer of type 'int *' from literal 'false'}} +{ + foo(false); // expected-warning{{ initialization of pointer of type 'int *' from literal 'false'}} +} + -- cgit v1.3