diff options
author | Chad Rosier <mcrosier@apple.com> | 2012-03-15 01:00:38 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2012-03-15 01:00:38 +0000 |
commit | 9ca33fd56720112bcc4bccb8aa6107abbb68cae3 (patch) | |
tree | 5b059aa547b1b48a1ce20994614e0b91d6ac605f /test | |
parent | d75fb492f7616046797bfe5353e9478d8e25628e (diff) |
Revert r152745 as it's breaking the internal buildbots.
Abbreviated commit message:
Provide -Wnull-conversion separately from -Wconversion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152765 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Analysis/nullptr.cpp | 2 | ||||
-rw-r--r-- | test/SemaCXX/__null.cpp | 4 | ||||
-rw-r--r-- | test/SemaCXX/conversion.cpp | 4 |
3 files changed, 3 insertions, 7 deletions
diff --git a/test/Analysis/nullptr.cpp b/test/Analysis/nullptr.cpp index 3119b4fc39..c0fed87242 100644 --- a/test/Analysis/nullptr.cpp +++ b/test/Analysis/nullptr.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++11 -Wno-conversion-null -analyze -analyzer-checker=core -analyzer-store region -verify %s +// RUN: %clang_cc1 -std=c++11 -analyze -analyzer-checker=core -analyzer-store region -verify %s // test to see if nullptr is detected as a null pointer void foo1(void) { diff --git a/test/SemaCXX/__null.cpp b/test/SemaCXX/__null.cpp index 56e59c06f1..1989a45fb5 100644 --- a/test/SemaCXX/__null.cpp +++ b/test/SemaCXX/__null.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -Wno-null-conversion -fsyntax-only -verify -// RUN: %clang_cc1 -triple i686-unknown-unknown %s -Wno-null-conversion -fsyntax-only -verify +// RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -fsyntax-only -verify +// RUN: %clang_cc1 -triple i686-unknown-unknown %s -fsyntax-only -verify void f() { int* i = __null; diff --git a/test/SemaCXX/conversion.cpp b/test/SemaCXX/conversion.cpp index d9ba07ab5b..b069abc263 100644 --- a/test/SemaCXX/conversion.cpp +++ b/test/SemaCXX/conversion.cpp @@ -53,14 +53,10 @@ namespace test2 { }; } -// This file tests -Wnull-conversion, a subcategory of -Wconversion -// which is on by default. - void test3() { int a = NULL; // expected-warning {{implicit conversion of NULL constant to integer}} int b; b = NULL; // expected-warning {{implicit conversion of NULL constant to integer}} - long l = NULL; // FIXME: this should also warn, but currently does not if sizeof(NULL)==sizeof(inttype) int c = ((((NULL)))); // expected-warning {{implicit conversion of NULL constant to integer}} int d; d = ((((NULL)))); // expected-warning {{implicit conversion of NULL constant to integer}} |