summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/warn_false_to_pointer.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-09-28 14:54:11 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-09-28 14:54:11 +0000
commitd6ea6bd2a3f54ba7ab8dbc38f151d13629cf0fb6 (patch)
treed59d083a2a07c417c97b0c6c9133870c6967c1ae /clang/test/SemaCXX/warn_false_to_pointer.cpp
parent9f48354b71274883ee202635a80d37e6a3f8c009 (diff)
downloadbcm5719-llvm-d6ea6bd2a3f54ba7ab8dbc38f151d13629cf0fb6.tar.gz
bcm5719-llvm-d6ea6bd2a3f54ba7ab8dbc38f151d13629cf0fb6.zip
Don't warn with -Wbool-conversions if the user wrote an explicit cast like "(void *)false".
Fixes rdar://8459342. llvm-svn: 114955
Diffstat (limited to 'clang/test/SemaCXX/warn_false_to_pointer.cpp')
-rw-r--r--clang/test/SemaCXX/warn_false_to_pointer.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/warn_false_to_pointer.cpp b/clang/test/SemaCXX/warn_false_to_pointer.cpp
index 3a873d886f0..fb6f9551a7a 100644
--- a/clang/test/SemaCXX/warn_false_to_pointer.cpp
+++ b/clang/test/SemaCXX/warn_false_to_pointer.cpp
@@ -5,5 +5,6 @@ int* j = false; // expected-warning{{ initialization of pointer of type 'int *'
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'}}
+ foo((int*)false);
}
OpenPOWER on IntegriCloud