diff options
| author | David Blaikie <dblaikie@gmail.com> | 2011-09-10 05:47:59 +0000 |
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2011-09-10 05:47:59 +0000 |
| commit | f1e2924b6b910e98a03ffd883a168d24e63192c5 (patch) | |
| tree | 524eff56f7c64188433b936229fc81b1f092ef1e /clang/test/SemaCXX/warn-bool-conversion.cpp | |
| parent | d25ed06c63766c7f36c7be44e0abe208dc866fda (diff) | |
| download | bcm5719-llvm-f1e2924b6b910e98a03ffd883a168d24e63192c5.tar.gz bcm5719-llvm-f1e2924b6b910e98a03ffd883a168d24e63192c5.zip | |
Correctly referring to the null pointer as 'null' not the macro 'NULL' in the boolean conversion diagnostic message.
llvm-svn: 139465
Diffstat (limited to 'clang/test/SemaCXX/warn-bool-conversion.cpp')
| -rw-r--r-- | clang/test/SemaCXX/warn-bool-conversion.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/test/SemaCXX/warn-bool-conversion.cpp b/clang/test/SemaCXX/warn-bool-conversion.cpp index f6fa9f28369..595c749bcec 100644 --- a/clang/test/SemaCXX/warn-bool-conversion.cpp +++ b/clang/test/SemaCXX/warn-bool-conversion.cpp @@ -1,18 +1,18 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s -int* j = false; // expected-warning{{ initialization of pointer of type 'int *' to NULL from a constant boolean expression}} +int* j = false; // expected-warning{{ initialization of pointer of type 'int *' to null from a constant boolean expression}} -void foo(int* i, int *j=(false)) // expected-warning{{ initialization of pointer of type 'int *' to NULL from a constant boolean expression}} +void foo(int* i, int *j=(false)) // expected-warning{{ initialization of pointer of type 'int *' to null from a constant boolean expression}} { - foo(false); // expected-warning{{ initialization of pointer of type 'int *' to NULL from a constant boolean expression}} + foo(false); // expected-warning{{ initialization of pointer of type 'int *' to null from a constant boolean expression}} foo((int*)false); // no-warning: explicit cast foo(0); // no-warning: not a bool, even though its convertible to bool - foo(false == true); // expected-warning{{ initialization of pointer of type 'int *' to NULL from a constant boolean expression}} - foo((42 + 24) < 32); // expected-warning{{ initialization of pointer of type 'int *' to NULL from a constant boolean expression}} + foo(false == true); // expected-warning{{ initialization of pointer of type 'int *' to null from a constant boolean expression}} + foo((42 + 24) < 32); // expected-warning{{ initialization of pointer of type 'int *' to null from a constant boolean expression}} const bool kFlag = false; - foo(kFlag); // expected-warning{{ initialization of pointer of type 'int *' to NULL from a constant boolean expression}} + foo(kFlag); // expected-warning{{ initialization of pointer of type 'int *' to null from a constant boolean expression}} } char f(struct Undefined*); |

