diff options
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/CXX/class/class.local/p2.cpp | 3 | ||||
-rw-r--r-- | clang/test/CXX/dcl.decl/dcl.meaning/dcl.mptr/p3.cpp | 2 | ||||
-rw-r--r-- | clang/test/CXX/over/over.over/p2.cpp | 2 | ||||
-rw-r--r-- | clang/test/CXX/over/over.over/p4.cpp | 2 | ||||
-rw-r--r-- | clang/test/Sema/array-init.c | 2 | ||||
-rw-r--r-- | clang/test/Sema/init.c | 2 | ||||
-rw-r--r-- | clang/test/Sema/wchar.c | 4 | ||||
-rw-r--r-- | clang/test/SemaCXX/access-base-class.cpp | 9 | ||||
-rw-r--r-- | clang/test/SemaCXX/bool.cpp | 2 | ||||
-rw-r--r-- | clang/test/SemaCXX/condition.cpp | 4 | ||||
-rw-r--r-- | clang/test/SemaCXX/convert-to-bool.cpp | 2 | ||||
-rw-r--r-- | clang/test/SemaCXX/deleted-function.cpp | 4 | ||||
-rw-r--r-- | clang/test/SemaCXX/direct-initializer.cpp | 4 | ||||
-rw-r--r-- | clang/test/SemaCXX/exception-spec.cpp | 10 | ||||
-rw-r--r-- | clang/test/SemaCXX/member-pointer.cpp | 4 | ||||
-rw-r--r-- | clang/test/SemaCXX/nullptr.cpp | 2 | ||||
-rw-r--r-- | clang/test/SemaObjCXX/conditional-expr.mm | 4 | ||||
-rw-r--r-- | clang/test/SemaTemplate/fun-template-def.cpp | 6 | ||||
-rw-r--r-- | clang/test/SemaTemplate/instantiate-method.cpp | 2 |
19 files changed, 33 insertions, 37 deletions
diff --git a/clang/test/CXX/class/class.local/p2.cpp b/clang/test/CXX/class/class.local/p2.cpp index a1fed53b3c0..56ff1e53a49 100644 --- a/clang/test/CXX/class/class.local/p2.cpp +++ b/clang/test/CXX/class/class.local/p2.cpp @@ -7,6 +7,5 @@ void f() { B b; - A *a = &b; // expected-error{{conversion from 'struct B' to inaccessible base class 'struct A'}} \ - expected-error{{incompatible type initializing 'struct B *', expected 'struct A *'}} + A *a = &b; // expected-error{{conversion from 'struct B' to inaccessible base class 'struct A'}} } diff --git a/clang/test/CXX/dcl.decl/dcl.meaning/dcl.mptr/p3.cpp b/clang/test/CXX/dcl.decl/dcl.meaning/dcl.mptr/p3.cpp index 1635ca792fe..561e26b068f 100644 --- a/clang/test/CXX/dcl.decl/dcl.meaning/dcl.mptr/p3.cpp +++ b/clang/test/CXX/dcl.decl/dcl.meaning/dcl.mptr/p3.cpp @@ -16,7 +16,7 @@ void f() { int b; A a(b); - int A::*ip = &A::s; // expected-error {{incompatible type initializing 'int *', expected 'int class A::*'}} + int A::*ip = &A::s; // expected-error {{cannot initialize a variable of type 'int class A::*' with an rvalue of type 'int *'}} a.*&A::s = 10; // expected-error{{right hand operand to .* has non pointer-to-member type 'int *'}} a.*&A::i = 10; // expected-error{{cannot form a pointer-to-member to member 'i' of reference type 'int &'}} diff --git a/clang/test/CXX/over/over.over/p2.cpp b/clang/test/CXX/over/over.over/p2.cpp index 70c786b3952..e8840d205e8 100644 --- a/clang/test/CXX/over/over.over/p2.cpp +++ b/clang/test/CXX/over/over.over/p2.cpp @@ -5,6 +5,6 @@ template<typename T> T f0(T, T); void test_f0() { int (*f0a)(int, int) = f0; int (*f0b)(int, int) = &f0; - int (*f0c)(int, float) = f0; // expected-error{{incompatible type}} + int (*f0c)(int, float) = f0; // expected-error{{cannot initialize}} // FIXME: poor error message above! } diff --git a/clang/test/CXX/over/over.over/p4.cpp b/clang/test/CXX/over/over.over/p4.cpp index b1837b81c3a..4189218f652 100644 --- a/clang/test/CXX/over/over.over/p4.cpp +++ b/clang/test/CXX/over/over.over/p4.cpp @@ -18,6 +18,6 @@ int f0(int); void test_f0_2() { using namespace N; int (*fp0)(int) = f0; // expected-error{{ambiguous}} \ - // expected-error{{initializing}} + // expected-error{{cannot initialize}} float (*fp1)(float) = f0; } diff --git a/clang/test/Sema/array-init.c b/clang/test/Sema/array-init.c index fbcf06bd162..45d31838529 100644 --- a/clang/test/Sema/array-init.c +++ b/clang/test/Sema/array-init.c @@ -167,7 +167,7 @@ void charArrays() { void variableArrayInit() { int a = 4; - char strlit[a] = "foo"; //expected-error{{variable-sized object may not be initialized}} + char strlit[a] = "foo"; //expected-error{{array initializer must be an initializer list or string literal}} int b[a] = { 1, 2, 4 }; //expected-error{{variable-sized object may not be initialized}} } diff --git a/clang/test/Sema/init.c b/clang/test/Sema/init.c index 9ebbce97584..c2712480c61 100644 --- a/clang/test/Sema/init.c +++ b/clang/test/Sema/init.c @@ -20,7 +20,7 @@ int *h = &x; int test() { int a[10]; -int b[10] = a; // expected-error {{initialization with '{...}' expected}} +int b[10] = a; // expected-error {{array initializer must be an initializer list}} int +; // expected-error {{expected identifier or '('}} } diff --git a/clang/test/Sema/wchar.c b/clang/test/Sema/wchar.c index edec2b30cea..28ec2f14ceb 100644 --- a/clang/test/Sema/wchar.c +++ b/clang/test/Sema/wchar.c @@ -17,6 +17,6 @@ int check_wchar_size[sizeof(*L"") == sizeof(wchar_t) ? 1 : -1]; void foo() { WCHAR_T_TYPE t1[] = L"x"; wchar_t tab[] = L"x"; - WCHAR_T_TYPE t2[] = "x"; // expected-error {{initialization}} - char t3[] = L"x"; // expected-error {{initialization}} + WCHAR_T_TYPE t2[] = "x"; // expected-error {{initializer}} + char t3[] = L"x"; // expected-error {{initializer}} } diff --git a/clang/test/SemaCXX/access-base-class.cpp b/clang/test/SemaCXX/access-base-class.cpp index 6956553f836..f4c58d940b6 100644 --- a/clang/test/SemaCXX/access-base-class.cpp +++ b/clang/test/SemaCXX/access-base-class.cpp @@ -5,8 +5,7 @@ class A { }; class B : private A { }; // expected-note {{'private' inheritance specifier here}} void f(B* b) { - A *a = b; // expected-error{{conversion from 'class T1::B' to inaccessible base class 'class T1::A'}} \ - expected-error{{incompatible type initializing 'class T1::B *', expected 'class T1::A *'}} + A *a = b; // expected-error{{conversion from 'class T1::B' to inaccessible base class 'class T1::A'}} } } @@ -17,8 +16,7 @@ class A { }; class B : A { }; // expected-note {{inheritance is implicitly 'private'}} void f(B* b) { - A *a = b; // expected-error {{conversion from 'class T2::B' to inaccessible base class 'class T2::A'}} \ - expected-error {{incompatible type initializing 'class T2::B *', expected 'class T2::A *'}} + A *a = b; // expected-error {{conversion from 'class T2::B' to inaccessible base class 'class T2::A'}} } } @@ -71,8 +69,7 @@ namespace T6 { class C : public B { void f(C *c) { - A* a = c; // expected-error {{conversion from 'class T6::C' to inaccessible base class 'class T6::A'}} \ - expected-error {{incompatible type initializing 'class T6::C *', expected 'class T6::A *'}} + A* a = c; // expected-error {{conversion from 'class T6::C' to inaccessible base class 'class T6::A'}} } }; diff --git a/clang/test/SemaCXX/bool.cpp b/clang/test/SemaCXX/bool.cpp index c0367aa3e54..44e17ce62b7 100644 --- a/clang/test/SemaCXX/bool.cpp +++ b/clang/test/SemaCXX/bool.cpp @@ -14,7 +14,7 @@ void test(bool b) --b; // expected-error {{cannot decrement expression of type bool}} b--; // expected-error {{cannot decrement expression of type bool}} - bool *b1 = (int *)0; // expected-error{{expected 'bool *'}} + bool *b1 = (int *)0; // expected-error{{cannot initialize}} } // static_assert_arg_is_bool(x) compiles only if x is a bool. diff --git a/clang/test/SemaCXX/condition.cpp b/clang/test/SemaCXX/condition.cpp index aede25e3f79..a0b57e1baa5 100644 --- a/clang/test/SemaCXX/condition.cpp +++ b/clang/test/SemaCXX/condition.cpp @@ -6,7 +6,7 @@ void test() { if (int x=0) ++x; typedef int arr[10]; - while (arr x=0) ; // expected-error {{an array type is not allowed here}} expected-error {{initialization with '{...}' expected for array}} + while (arr x=0) ; // expected-error {{an array type is not allowed here}} expected-error {{array initializer must be an initializer list}} while (int f()=0) ; // expected-error {{a function type is not allowed here}} struct S {} s; @@ -18,7 +18,7 @@ void test() { while (struct S {} x=0) ; // expected-error {{types may not be defined in conditions}} expected-error {{no viable conversion}} expected-error {{value of type 'struct S' is not contextually convertible to 'bool'}} expected-note{{candidate function}} while (struct {} x=0) ; // expected-error {{types may not be defined in conditions}} expected-error {{no viable conversion}} expected-error {{value of type 'struct <anonymous>' is not contextually convertible to 'bool'}} expected-note{{candidate function}} - switch (enum {E} x=0) ; // expected-error {{types may not be defined in conditions}} expected-error {{incompatible type}} + switch (enum {E} x=0) ; // expected-error {{types may not be defined in conditions}} expected-error {{cannot initialize}} if (int x=0) { // expected-note 2 {{previous definition is here}} int x; // expected-error {{redefinition of 'x'}} diff --git a/clang/test/SemaCXX/convert-to-bool.cpp b/clang/test/SemaCXX/convert-to-bool.cpp index 543f6b1f017..4b5002e44a0 100644 --- a/clang/test/SemaCXX/convert-to-bool.cpp +++ b/clang/test/SemaCXX/convert-to-bool.cpp @@ -44,7 +44,7 @@ struct ExplicitConvToRef { void test_explicit_bool(ExplicitConvToBool ecb) { bool b1(ecb); // okay - bool b2 = ecb; // expected-error{{incompatible type initializing 'struct ExplicitConvToBool', expected 'bool'}} + bool b2 = ecb; // expected-error{{no viable conversion from 'struct ExplicitConvToBool' to 'bool'}} accepts_bool(ecb); // expected-error{{no matching function for call to}} } diff --git a/clang/test/SemaCXX/deleted-function.cpp b/clang/test/SemaCXX/deleted-function.cpp index c827b6e75e1..572ef343309 100644 --- a/clang/test/SemaCXX/deleted-function.cpp +++ b/clang/test/SemaCXX/deleted-function.cpp @@ -18,7 +18,7 @@ void ov(double) = delete; // expected-note {{candidate function has been explici struct WithDel { WithDel() = delete; // expected-note {{candidate function has been explicitly deleted}} void fn() = delete; // expected-note {{function has been explicitly marked deleted here}} - operator int() = delete; + operator int() = delete; // expected-note {{function has been explicitly marked deleted here}} void operator +(int) = delete; int i = delete; // expected-error {{only functions can have deleted definitions}} @@ -32,5 +32,5 @@ void test() { WithDel dd; // expected-error {{call to deleted constructor of 'dd'}} WithDel *d = 0; d->fn(); // expected-error {{attempt to use a deleted function}} - int i = *d; // expected-error {{incompatible type initializing}} + int i = *d; // expected-error {{invokes a deleted function}} } diff --git a/clang/test/SemaCXX/direct-initializer.cpp b/clang/test/SemaCXX/direct-initializer.cpp index 4809daba958..0930ff798fb 100644 --- a/clang/test/SemaCXX/direct-initializer.cpp +++ b/clang/test/SemaCXX/direct-initializer.cpp @@ -40,11 +40,11 @@ struct Base { }; struct Derived : Base { - operator int*(); + operator int*(); // expected-note {{candidate function}} }; void foo(const Derived cd, Derived d) { - int *pi = cd; // expected-error {{incompatible type initializing 'struct Derived const', expected 'int *'}} + int *pi = cd; // expected-error {{no viable conversion from 'struct Derived const' to 'int *'}} int *ppi = d; } diff --git a/clang/test/SemaCXX/exception-spec.cpp b/clang/test/SemaCXX/exception-spec.cpp index c46da15bec0..291b359dfdc 100644 --- a/clang/test/SemaCXX/exception-spec.cpp +++ b/clang/test/SemaCXX/exception-spec.cpp @@ -160,11 +160,11 @@ void fnptrs() // return types and arguments must match exactly, no inheritance allowed void (*(*t7)())() throw(B1) = &s8; // valid - void (*(*t8)())() throw(A) = &s8; // expected-error {{return types differ}} expected-error {{incompatible type}} - void (*(*t9)())() throw(D) = &s8; // expected-error {{return types differ}} expected-error {{incompatible type}} + void (*(*t8)())() throw(A) = &s8; // expected-error {{return types differ}} + void (*(*t9)())() throw(D) = &s8; // expected-error {{return types differ}} void (*t10)(void (*)() throw(B1)) = &s9; // valid expected-warning{{disambiguated}} - void (*t11)(void (*)() throw(A)) = &s9; // expected-error {{argument types differ}} expected-error {{incompatible type}} expected-warning{{disambiguated}} - void (*t12)(void (*)() throw(D)) = &s9; // expected-error {{argument types differ}} expected-error {{incompatible type}} expected-warning{{disambiguated}} + void (*t11)(void (*)() throw(A)) = &s9; // expected-error {{argument types differ}} expected-warning{{disambiguated}} + void (*t12)(void (*)() throw(D)) = &s9; // expected-error {{argument types differ}} expected-warning{{disambiguated}} } // Member function stuff @@ -178,7 +178,7 @@ void mfnptr() { void (Str1::*pfn1)() throw(int) = &Str1::f; // valid void (Str1::*pfn2)() = &Str1::f; // valid - void (Str1::*pfn3)() throw() = &Str1::f; // expected-error {{not superset}} expected-error {{incompatible type}} + void (Str1::*pfn3)() throw() = &Str1::f; // expected-error {{not superset}} } // Don't suppress errors in template instantiation. diff --git a/clang/test/SemaCXX/member-pointer.cpp b/clang/test/SemaCXX/member-pointer.cpp index f51ebc51a1d..65d05eb5af7 100644 --- a/clang/test/SemaCXX/member-pointer.cpp +++ b/clang/test/SemaCXX/member-pointer.cpp @@ -35,8 +35,8 @@ void f() { pdid = pdi2; // Fail conversion due to ambiguity and virtuality. - int F::*pdif = pdi1; // expected-error {{ambiguous conversion from pointer to member of base class 'struct A' to pointer to member of derived class 'struct F'}} expected-error {{incompatible type}} - int G::*pdig = pdi1; // expected-error {{conversion from pointer to member of class 'struct A' to pointer to member of class 'struct G' via virtual base 'struct D' is not allowed}} expected-error {{incompatible type}} + int F::*pdif = pdi1; // expected-error {{ambiguous conversion from pointer to member of base class 'struct A' to pointer to member of derived class 'struct F'}} + int G::*pdig = pdi1; // expected-error {{conversion from pointer to member of class 'struct A' to pointer to member of class 'struct G' via virtual base 'struct D' is not allowed}} // Conversion to member of base. pdi1 = pdid; // expected-error {{incompatible type assigning 'int struct D::*', expected 'int struct A::*'}} diff --git a/clang/test/SemaCXX/nullptr.cpp b/clang/test/SemaCXX/nullptr.cpp index 445f33cdcc6..a3aab7fbe3e 100644 --- a/clang/test/SemaCXX/nullptr.cpp +++ b/clang/test/SemaCXX/nullptr.cpp @@ -29,7 +29,7 @@ nullptr_t f(nullptr_t null) bool b = nullptr; // Can't convert nullptr to integral implicitly. - uintptr_t i = nullptr; // expected-error {{incompatible type initializing}} + uintptr_t i = nullptr; // expected-error {{cannot initialize}} // Operators (void)(null == nullptr); diff --git a/clang/test/SemaObjCXX/conditional-expr.mm b/clang/test/SemaObjCXX/conditional-expr.mm index 0857ae27d52..a6b7c08e8fc 100644 --- a/clang/test/SemaObjCXX/conditional-expr.mm +++ b/clang/test/SemaObjCXX/conditional-expr.mm @@ -27,11 +27,11 @@ void f1(id x, A *a) { } void f2(id<P1> x) { - id<P0> l = x; // expected-error {{incompatible type initializing 'id<P1>', expected 'id<P0>'}} + id<P0> l = x; // expected-error {{cannot initialize a variable of type 'id<P0>' with an lvalue of type 'id<P1>'}} } void f3(A *a) { - id<P1> l = a; // expected-error {{incompatible type initializing 'A *', expected 'id<P1>'}} + id<P1> l = a; // expected-error {{cannot initialize a variable of type 'id<P1>' with an lvalue of type 'A *'}} } void f4(int cond, id x, A *a) { diff --git a/clang/test/SemaTemplate/fun-template-def.cpp b/clang/test/SemaTemplate/fun-template-def.cpp index cc28553ebcd..0c2cf9c4f2e 100644 --- a/clang/test/SemaTemplate/fun-template-def.cpp +++ b/clang/test/SemaTemplate/fun-template-def.cpp @@ -8,7 +8,7 @@ // Fake typeid, lacking a typeinfo header. namespace std { class type_info {}; } -struct dummy {}; // expected-note{{candidate function}} +struct dummy {}; // expected-note 3 {{candidate function}} template<typename T> int f0(T x) { @@ -39,9 +39,9 @@ T f1(T t1, U u1, int i1) new (t1, u1) int; delete t1; - dummy d1 = sizeof(t1); // FIXME: delayed checking okay? + dummy d1 = sizeof(t1); // expected-error {{no viable conversion}} dummy d2 = offsetof(T, foo); // expected-error {{no viable conversion}} - dummy d3 = __alignof(u1); // FIXME: delayed checking okay? + dummy d3 = __alignof(u1); // expected-error {{no viable conversion}} i1 = typeid(t1); // expected-error {{incompatible type assigning}} return u1; diff --git a/clang/test/SemaTemplate/instantiate-method.cpp b/clang/test/SemaTemplate/instantiate-method.cpp index 422364c155b..a02fe5238c3 100644 --- a/clang/test/SemaTemplate/instantiate-method.cpp +++ b/clang/test/SemaTemplate/instantiate-method.cpp @@ -79,7 +79,7 @@ template<class T> struct A1; int *a(A0<int> &x0, A1<int> &x1) { int *y0 = x0; - int *y1 = x1; // expected-error{{initializing}} + int *y1 = x1; // expected-error{{no viable conversion}} } struct X0Base { |