diff options
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp | 4 | ||||
-rw-r--r-- | clang/test/Parser/cxx-casting.cpp | 2 | ||||
-rw-r--r-- | clang/test/SemaCXX/cstyle-cast.cpp | 6 | ||||
-rw-r--r-- | clang/test/SemaCXX/functional-cast.cpp | 6 | ||||
-rw-r--r-- | clang/test/SemaCXX/new-delete.cpp | 4 | ||||
-rw-r--r-- | clang/test/SemaCXX/static-cast.cpp | 6 |
6 files changed, 14 insertions, 14 deletions
diff --git a/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp b/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp index dc2c209af26..b8504d49065 100644 --- a/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp +++ b/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp @@ -11,7 +11,7 @@ void test_attributes() { template<typename T> struct bogus_override_if_virtual : public T { - bogus_override_if_virtual() : T(*(T*)0) { } + bogus_override_if_virtual() : T(*(T*)0) { } // expected-warning {{binding dereferenced null pointer to reference has undefined behavior}} int operator()() const; }; @@ -36,7 +36,7 @@ void test_quals() { lv(); // expected-error{{no matching function for call to object of type}} mlv(); // expected-error{{no matching function for call to object of type}} - bogus_override_if_virtual<decltype(l)> bogus; + bogus_override_if_virtual<decltype(l)> bogus; // expected-note{{in instantiation of member function 'bogus_override_if_virtual<(lambda}} } // Core issue 974: default arguments (8.3.6) may be specified in the diff --git a/clang/test/Parser/cxx-casting.cpp b/clang/test/Parser/cxx-casting.cpp index 43885bff27a..b1ae591865e 100644 --- a/clang/test/Parser/cxx-casting.cpp +++ b/clang/test/Parser/cxx-casting.cpp @@ -37,7 +37,7 @@ char postfix_expr_test() // This was being incorrectly tentatively parsed. namespace test1 { template <class T> class A {}; // expected-note 2{{here}} - void foo() { A<int>(*(A<int>*)0); } + void foo() { A<int>(*(A<int>*)0); } // expected-warning {{binding dereferenced null pointer to reference has undefined behavior}} } typedef char* c; diff --git a/clang/test/SemaCXX/cstyle-cast.cpp b/clang/test/SemaCXX/cstyle-cast.cpp index afac6a137ec..2327d7b51d9 100644 --- a/clang/test/SemaCXX/cstyle-cast.cpp +++ b/clang/test/SemaCXX/cstyle-cast.cpp @@ -84,11 +84,11 @@ void t_529_2() (void)(void*)((int*)0); (void)(volatile const void*)((const int*)0); (void)(A*)((B*)0); - (void)(A&)(*((B*)0)); + (void)(A&)(*((B*)0)); // expected-warning {{binding dereferenced null pointer to reference has undefined behavior}} (void)(const B*)((C1*)0); - (void)(B&)(*((C1*)0)); + (void)(B&)(*((C1*)0)); // expected-warning {{binding dereferenced null pointer to reference has undefined behavior}} (void)(A*)((D*)0); - (void)(const A&)(*((D*)0)); + (void)(const A&)(*((D*)0)); // expected-warning {{binding dereferenced null pointer to reference has undefined behavior}} (void)(int B::*)((int A::*)0); (void)(void (B::*)())((void (A::*)())0); (void)(A*)((E*)0); // C-style cast ignores access control diff --git a/clang/test/SemaCXX/functional-cast.cpp b/clang/test/SemaCXX/functional-cast.cpp index 9db95e80d03..216ee240c83 100644 --- a/clang/test/SemaCXX/functional-cast.cpp +++ b/clang/test/SemaCXX/functional-cast.cpp @@ -126,14 +126,14 @@ void t_529_2() typedef A *Ap; (void)Ap((B*)0); typedef A &Ar; - (void)Ar(*((B*)0)); + (void)Ar(*((B*)0)); // expected-warning {{binding dereferenced null pointer to reference has undefined behavior}} typedef const B *cBp; (void)cBp((C1*)0); typedef B &Br; - (void)Br(*((C1*)0)); + (void)Br(*((C1*)0)); // expected-warning {{binding dereferenced null pointer to reference has undefined behavior}} (void)Ap((D*)0); typedef const A &cAr; - (void)cAr(*((D*)0)); + (void)cAr(*((D*)0)); // expected-warning {{binding dereferenced null pointer to reference has undefined behavior}} typedef int B::*Bmp; (void)Bmp((int A::*)0); typedef void (B::*Bmfp)(); diff --git a/clang/test/SemaCXX/new-delete.cpp b/clang/test/SemaCXX/new-delete.cpp index 7bc724b2101..e96603d69e1 100644 --- a/clang/test/SemaCXX/new-delete.cpp +++ b/clang/test/SemaCXX/new-delete.cpp @@ -444,11 +444,11 @@ namespace r150682 { template<typename X> void tfn() { - new (*(PlacementArg*)0) T[1]; + new (*(PlacementArg*)0) T[1]; // expected-warning 2 {{binding dereferenced null pointer to reference has undefined behavior}} } void fn() { - tfn<int>(); + tfn<int>(); // expected-note {{in instantiation of function template specialization 'r150682::tfn<int>' requested here}} } } diff --git a/clang/test/SemaCXX/static-cast.cpp b/clang/test/SemaCXX/static-cast.cpp index b3fe49a88c6..ff47c0bb4dc 100644 --- a/clang/test/SemaCXX/static-cast.cpp +++ b/clang/test/SemaCXX/static-cast.cpp @@ -43,11 +43,11 @@ void t_529_2() (void)static_cast<void*>((int*)0); (void)static_cast<volatile const void*>((const int*)0); (void)static_cast<A*>((B*)0); - (void)static_cast<A&>(*((B*)0)); + (void)static_cast<A&>(*((B*)0)); // expected-warning {{binding dereferenced null pointer to reference has undefined behavior}} (void)static_cast<const B*>((C1*)0); - (void)static_cast<B&>(*((C1*)0)); + (void)static_cast<B&>(*((C1*)0)); // expected-warning {{binding dereferenced null pointer to reference has undefined behavior}} (void)static_cast<A*>((D*)0); - (void)static_cast<const A&>(*((D*)0)); + (void)static_cast<const A&>(*((D*)0)); // expected-warning {{binding dereferenced null pointer to reference has undefined behavior}} (void)static_cast<int B::*>((int A::*)0); (void)static_cast<void (B::*)()>((void (A::*)())0); |