From 0c42bb653dc40b1caae010618831e320af824b18 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 5 Sep 2010 00:17:29 +0000 Subject: [PATCH] 'const std::type_info*' instead of 'std::type_info const*' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113092 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AST/TypePrinter.cpp | 2 +- .../dcl.init/dcl.init.ref/p5-examples.cpp | 12 ++++++------ .../dcl.decl/dcl.init/dcl.init.ref/p5-var.cpp | 16 ++++++++-------- test/CXX/dcl.decl/dcl.init/p6.cpp | 2 +- test/CXX/special/class.copy/p9.cpp | 8 ++++---- test/CodeGenCXX/vtable-layout.cpp | 2 +- test/Index/code-completion.cpp | 6 +++--- test/Misc/diag-aka-types.cpp | 2 +- test/SemaCXX/builtin-ptrtomember-ambig.cpp | 4 ++-- test/SemaCXX/conditional-expr.cpp | 4 ++-- test/SemaCXX/copy-initialization.cpp | 4 ++-- test/SemaCXX/decl-init-ref.cpp | 2 +- test/SemaCXX/direct-initializer.cpp | 2 +- test/SemaCXX/overload-member-call.cpp | 8 ++++---- test/SemaCXX/overloaded-operator.cpp | 2 +- test/SemaCXX/ref-init-ambiguous.cpp | 6 +++--- test/SemaCXX/static-cast.cpp | 4 ++-- test/SemaCXX/virtual-override.cpp | 2 +- test/SemaObjC/bad-receiver-1.m | 2 +- test/SemaTemplate/fun-template-def.cpp | 2 +- test/SemaTemplate/temp_arg_nontype.cpp | 2 +- 21 files changed, 47 insertions(+), 47 deletions(-) diff --git a/lib/AST/TypePrinter.cpp b/lib/AST/TypePrinter.cpp index f529187145..e080571552 100644 --- a/lib/AST/TypePrinter.cpp +++ b/lib/AST/TypePrinter.cpp @@ -73,7 +73,7 @@ void TypePrinter::Print(QualType T, std::string &S) { // "int * const", printing "const int *" is different. Only do this when the // type expands to a simple string. bool CanPrefixQualifiers = - isa(T) || isa(T); + isa(T) || isa(T) || isa(T); if (!CanPrefixQualifiers && !Quals.empty()) { std::string TQS; diff --git a/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-examples.cpp b/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-examples.cpp index b50bcb9aec..5ab1ecd295 100644 --- a/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-examples.cpp +++ b/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-examples.cpp @@ -19,8 +19,8 @@ void example1() { // CHECK: A &ra = // CHECK: ImplicitCastExpr{{.*}}'struct A' lvalue A &ra = b; - // CHECK: A const &rca = - // CHECK: ImplicitCastExpr{{.*}}'struct A const' + // CHECK: const A &rca = + // CHECK: ImplicitCastExpr{{.*}}'const struct A' // CHECK: ImplicitCastExpr{{.*}}'struct A' const A& rca = b; } @@ -33,13 +33,13 @@ struct X { // CHECK: example2 void example2() { - // CHECK: A const &rca = - // CHECK: ImplicitCastExpr{{.*}}'struct A const' + // CHECK: const A &rca = + // CHECK: ImplicitCastExpr{{.*}}'const struct A' // CHECK: ImplicitCastExpr{{.*}}'struct A' // CHECK: CallExpr{{.*}}B const A &rca = f(); - // CHECK: A const &r = - // CHECK: ImplicitCastExpr{{.*}}'struct A const' + // CHECK: const A &r = + // CHECK: ImplicitCastExpr{{.*}}'const struct A' // CHECK: ImplicitCastExpr{{.*}}'struct A' // CHECK: CXXMemberCallExpr{{.*}}'struct B' const A& r = x; diff --git a/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-var.cpp b/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-var.cpp index 382488a9b6..099f91caf6 100644 --- a/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-var.cpp +++ b/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-var.cpp @@ -64,8 +64,8 @@ void bind_lvalue_quals(volatile Base b, volatile Derived d, volatile const int ivc) { volatile Base &bvr1 = b; volatile Base &bvr2 = d; - volatile Base &bvr3 = bvc; // expected-error{{binding of reference to type 'Base volatile' to a value of type 'Base const volatile' drops qualifiers}} - volatile Base &bvr4 = dvc; // expected-error{{binding of reference to type 'Base volatile' to a value of type 'Derived const volatile' drops qualifiers}} + volatile Base &bvr3 = bvc; // expected-error{{binding of reference to type 'volatile Base' to a value of type 'const volatile Base' drops qualifiers}} + volatile Base &bvr4 = dvc; // expected-error{{binding of reference to type 'volatile Base' to a value of type 'const volatile Derived' drops qualifiers}} volatile int &ir = ivc; // expected-error{{binding of reference to type 'volatile int' to a value of type 'const volatile int' drops qualifiers}} @@ -76,15 +76,15 @@ void bind_lvalue_quals(volatile Base b, volatile Derived d, void bind_lvalue_to_rvalue() { Base &br1 = Base(); // expected-error{{non-const lvalue reference to type 'Base' cannot bind to a temporary of type 'Base'}} Base &br2 = Derived(); // expected-error{{non-const lvalue reference to type 'Base' cannot bind to a temporary of type 'Derived'}} - const volatile Base &br3 = Base(); // expected-error{{volatile lvalue reference to type 'Base const volatile' cannot bind to a temporary of type 'Base'}} - const volatile Base &br4 = Derived(); // expected-error{{volatile lvalue reference to type 'Base const volatile' cannot bind to a temporary of type 'Derived'}} + const volatile Base &br3 = Base(); // expected-error{{volatile lvalue reference to type 'const volatile Base' cannot bind to a temporary of type 'Base'}} + const volatile Base &br4 = Derived(); // expected-error{{volatile lvalue reference to type 'const volatile Base' cannot bind to a temporary of type 'Derived'}} int &ir = 17; // expected-error{{non-const lvalue reference to type 'int' cannot bind to a temporary of type 'int'}} } void bind_lvalue_to_unrelated(Unrelated ur) { Base &br1 = ur; // expected-error{{non-const lvalue reference to type 'Base' cannot bind to a value of unrelated type 'Unrelated'}} - const volatile Base &br2 = ur; // expected-error{{volatile lvalue reference to type 'Base const volatile' cannot bind to a value of unrelated type 'Unrelated'}} + const volatile Base &br2 = ur; // expected-error{{volatile lvalue reference to type 'const volatile Base' cannot bind to a value of unrelated type 'Unrelated'}} } void bind_lvalue_to_conv_lvalue() { @@ -118,8 +118,8 @@ void bind_const_lvalue_to_rvalue() { const Base &br3 = create(); const Base &br4 = create(); - const Base &br5 = create(); // expected-error{{binding of reference to type 'Base const' to a value of type 'Base const volatile' drops qualifiers}} - const Base &br6 = create(); // expected-error{{binding of reference to type 'Base const' to a value of type 'Derived const volatile' drops qualifiers}} + const Base &br5 = create(); // expected-error{{binding of reference to type 'const Base' to a value of type 'const volatile Base' drops qualifiers}} + const Base &br6 = create(); // expected-error{{binding of reference to type 'const Base' to a value of type 'const volatile Derived' drops qualifiers}} const int &ir = create(); } @@ -131,5 +131,5 @@ void bind_const_lvalue_to_class_conv_temporary() { } void bind_lvalue_to_conv_rvalue_ambig(ConvertibleToBothDerived both) { const Derived &dr1 = both; - const Base &br1 = both; // expected-error{{reference initialization of type 'Base const &' with initializer of type 'ConvertibleToBothDerived' is ambiguous}} + const Base &br1 = both; // expected-error{{reference initialization of type 'const Base &' with initializer of type 'ConvertibleToBothDerived' is ambiguous}} } diff --git a/test/CXX/dcl.decl/dcl.init/p6.cpp b/test/CXX/dcl.decl/dcl.init/p6.cpp index 7767761b1d..da6f5b5369 100644 --- a/test/CXX/dcl.decl/dcl.init/p6.cpp +++ b/test/CXX/dcl.decl/dcl.init/p6.cpp @@ -10,7 +10,7 @@ struct NoUserDefault : public MakeNonPOD { }; struct HasUserDefault { HasUserDefault(); }; void test_const_default_init() { - const NoUserDefault x1; // expected-error{{default initialization of an object of const type 'NoUserDefault const' requires a user-provided default constructor}} + const NoUserDefault x1; // expected-error{{default initialization of an object of const type 'const NoUserDefault' requires a user-provided default constructor}} const HasUserDefault x2; const int x3; // expected-error{{default initialization of an object of const type 'const int'}} } diff --git a/test/CXX/special/class.copy/p9.cpp b/test/CXX/special/class.copy/p9.cpp index d03794420e..494b12fd79 100644 --- a/test/CXX/special/class.copy/p9.cpp +++ b/test/CXX/special/class.copy/p9.cpp @@ -37,8 +37,8 @@ void test_non_const_copy(const ImplicitNonConstCopy1 &cincc1, const ImplicitNonConstCopy2 &cincc2, const ImplicitNonConstCopy3 &cincc3, const ImplicitNonConstCopy4 &cincc4) { - (void)sizeof(ImplicitNonConstCopy1(cincc1)); // expected-error{{functional-style cast from 'ImplicitNonConstCopy1 const' to 'ImplicitNonConstCopy1' is not allowed}} - (void)sizeof(ImplicitNonConstCopy2(cincc2)); // expected-error{{functional-style cast from 'ImplicitNonConstCopy2 const' to 'ImplicitNonConstCopy2' is not allowed}} - (void)sizeof(ImplicitNonConstCopy3(cincc3)); // expected-error{{functional-style cast from 'ImplicitNonConstCopy3 const' to 'ImplicitNonConstCopy3' is not allowed}} - (void)sizeof(ImplicitNonConstCopy4(cincc4)); // expected-error{{functional-style cast from 'ImplicitNonConstCopy4 const' to 'ImplicitNonConstCopy4' is not allowed}} + (void)sizeof(ImplicitNonConstCopy1(cincc1)); // expected-error{{functional-style cast from 'const ImplicitNonConstCopy1' to 'ImplicitNonConstCopy1' is not allowed}} + (void)sizeof(ImplicitNonConstCopy2(cincc2)); // expected-error{{functional-style cast from 'const ImplicitNonConstCopy2' to 'ImplicitNonConstCopy2' is not allowed}} + (void)sizeof(ImplicitNonConstCopy3(cincc3)); // expected-error{{functional-style cast from 'const ImplicitNonConstCopy3' to 'ImplicitNonConstCopy3' is not allowed}} + (void)sizeof(ImplicitNonConstCopy4(cincc4)); // expected-error{{functional-style cast from 'const ImplicitNonConstCopy4' to 'ImplicitNonConstCopy4' is not allowed}} } diff --git a/test/CodeGenCXX/vtable-layout.cpp b/test/CodeGenCXX/vtable-layout.cpp index 60b46fec39..1cf8a52d44 100644 --- a/test/CodeGenCXX/vtable-layout.cpp +++ b/test/CodeGenCXX/vtable-layout.cpp @@ -78,7 +78,7 @@ namespace Test2 { // CHECK-2-NEXT: 5 | Test2::A::~A() [complete] // CHECK-2-NEXT: 6 | Test2::A::~A() [deleting] // CHECK-2-NEXT: 7 | void Test2::A::h() -// CHECK-2-NEXT: 8 | Test2::A &Test2::A::operator=(Test2::A const &) +// CHECK-2-NEXT: 8 | Test2::A &Test2::A::operator=(const Test2::A &) struct A { virtual void f(); virtual void f() const; diff --git a/test/Index/code-completion.cpp b/test/Index/code-completion.cpp index 7b0c8d75d8..a0f0d3e70c 100644 --- a/test/Index/code-completion.cpp +++ b/test/Index/code-completion.cpp @@ -42,9 +42,9 @@ Z::operator int() const { // CHECK-MEMBER: FieldDecl:{ResultType float}{Text Y::}{TypedText member} // CHECK-MEMBER: CXXMethod:{ResultType void}{Informative Y::}{TypedText memfunc}{LeftParen (}{Optional {Placeholder int i}}{RightParen )} // CHECK-MEMBER: CXXConversion:{ResultType int}{TypedText operator int}{LeftParen (}{RightParen )}{Informative const} -// CHECK-MEMBER: CXXMethod:{ResultType Z &}{TypedText operator=}{LeftParen (}{Placeholder Z const &}{RightParen )} -// CHECK-MEMBER: CXXMethod:{ResultType X &}{Text X::}{TypedText operator=}{LeftParen (}{Placeholder X const &}{RightParen )} -// CHECK-MEMBER: CXXMethod:{ResultType Y &}{Text Y::}{TypedText operator=}{LeftParen (}{Placeholder Y const &}{RightParen )} +// CHECK-MEMBER: CXXMethod:{ResultType Z &}{TypedText operator=}{LeftParen (}{Placeholder const Z &}{RightParen )} +// CHECK-MEMBER: CXXMethod:{ResultType X &}{Text X::}{TypedText operator=}{LeftParen (}{Placeholder const X &}{RightParen )} +// CHECK-MEMBER: CXXMethod:{ResultType Y &}{Text Y::}{TypedText operator=}{LeftParen (}{Placeholder const Y &}{RightParen )} // CHECK-MEMBER: EnumConstantDecl:{ResultType X::E}{Informative E::}{TypedText Val1} // CHECK-MEMBER: StructDecl:{TypedText X}{Text ::} // CHECK-MEMBER: StructDecl:{TypedText Y}{Text ::} diff --git a/test/Misc/diag-aka-types.cpp b/test/Misc/diag-aka-types.cpp index 51d4093e74..b1c94ff539 100644 --- a/test/Misc/diag-aka-types.cpp +++ b/test/Misc/diag-aka-types.cpp @@ -7,4 +7,4 @@ foo_t *ptr; char c1 = ptr; // expected-error{{'foo_t *' (aka 'X *')}} const foo_t &ref = foo_t(); -char c2 = ref; // expected-error{{'const foo_t' (aka 'X const')}} +char c2 = ref; // expected-error{{'const foo_t' (aka 'const X')}} diff --git a/test/SemaCXX/builtin-ptrtomember-ambig.cpp b/test/SemaCXX/builtin-ptrtomember-ambig.cpp index 1b0460d091..32a893dafc 100644 --- a/test/SemaCXX/builtin-ptrtomember-ambig.cpp +++ b/test/SemaCXX/builtin-ptrtomember-ambig.cpp @@ -19,8 +19,8 @@ struct C : B { void foo(C c, int A::* pmf) { // FIXME. Why so many built-in candidates? int i = c->*pmf; // expected-error {{use of overloaded operator '->*' is ambiguous}} \ - // expected-note {{built-in candidate operator->*(struct A const *, const int struct A::*)}} \ - // expected-note {{built-in candidate operator->*(struct A const *, int struct A::*)}} \ + // expected-note {{built-in candidate operator->*(const struct A *, const int struct A::*)}} \ + // expected-note {{built-in candidate operator->*(const struct A *, int struct A::*)}} \ // expected-note {{built-in candidate operator->*(struct A *, const int struct A::*)}} \ // expected-note {{built-in candidate operator->*(struct A *, int struct A::*)}} } diff --git a/test/SemaCXX/conditional-expr.cpp b/test/SemaCXX/conditional-expr.cpp index 065179b6da..a7f2a4c915 100644 --- a/test/SemaCXX/conditional-expr.cpp +++ b/test/SemaCXX/conditional-expr.cpp @@ -106,8 +106,8 @@ void test() i1 = (i1 ? Base() : Derived()).trick(); i1 = (i1 ? Derived() : Base()).trick(); // should fail: const lost - (void)(i1 ? Base() : constder()); // expected-error {{incompatible operand types ('Base' and 'Derived const')}} - (void)(i1 ? constder() : Base()); // expected-error {{incompatible operand types ('Derived const' and 'Base')}} + (void)(i1 ? Base() : constder()); // expected-error {{incompatible operand types ('Base' and 'const Derived')}} + (void)(i1 ? constder() : Base()); // expected-error {{incompatible operand types ('const Derived' and 'Base')}} Priv priv; Fin fin; diff --git a/test/SemaCXX/copy-initialization.cpp b/test/SemaCXX/copy-initialization.cpp index 0c4aa964cb..641eaa9411 100644 --- a/test/SemaCXX/copy-initialization.cpp +++ b/test/SemaCXX/copy-initialization.cpp @@ -23,7 +23,7 @@ struct foo { }; // PR3600 -void test(const foo *P) { P->bar(); } // expected-error{{cannot initialize object parameter of type 'foo' with an expression of type 'foo const'}} +void test(const foo *P) { P->bar(); } // expected-error{{cannot initialize object parameter of type 'foo' with an expression of type 'const foo'}} namespace PR6757 { struct Foo { @@ -38,7 +38,7 @@ namespace PR6757 { void f(Foo); void g(Foo foo) { - f(Bar()); // expected-error{{no viable constructor copying parameter of type 'PR6757::Foo const'}} + f(Bar()); // expected-error{{no viable constructor copying parameter of type 'const PR6757::Foo'}} f(foo); } } diff --git a/test/SemaCXX/decl-init-ref.cpp b/test/SemaCXX/decl-init-ref.cpp index 922f0b7804..dc56332b5d 100644 --- a/test/SemaCXX/decl-init-ref.cpp +++ b/test/SemaCXX/decl-init-ref.cpp @@ -21,7 +21,7 @@ extern B f(); const int& ri = (void)0; // expected-error {{reference to type 'const int' could not bind to an rvalue of type 'void'}} int main() { - const A& rca = f(); // expected-error {{reference initialization of type 'A const &' with initializer of type 'B' is ambiguous}} + const A& rca = f(); // expected-error {{reference initialization of type 'const A &' with initializer of type 'B' is ambiguous}} A& ra = f(); // expected-error {{non-const lvalue reference to type 'A' cannot bind to a temporary of type 'B'}} } diff --git a/test/SemaCXX/direct-initializer.cpp b/test/SemaCXX/direct-initializer.cpp index 54cd6cacc0..a7899c75e4 100644 --- a/test/SemaCXX/direct-initializer.cpp +++ b/test/SemaCXX/direct-initializer.cpp @@ -44,7 +44,7 @@ struct Derived : Base { }; void foo(const Derived cd, Derived d) { - int *pi = cd; // expected-error {{no viable conversion from 'Derived const' to 'int *'}} + int *pi = cd; // expected-error {{no viable conversion from 'const Derived' to 'int *'}} int *ppi = d; } diff --git a/test/SemaCXX/overload-member-call.cpp b/test/SemaCXX/overload-member-call.cpp index 885a950a77..37815b9ccc 100644 --- a/test/SemaCXX/overload-member-call.cpp +++ b/test/SemaCXX/overload-member-call.cpp @@ -78,11 +78,11 @@ namespace test1 { void foo(int n, const char *s, int t, ...); // expected-note {{candidate function not viable: requires at least 3 arguments, but 2 were provided}} void foo(int n, const char *s, int t, int u = 0); // expected-note {{candidate function not viable: requires at least 3 arguments, but 2 were provided}} - void bar(double d); //expected-note {{candidate function not viable: 'this' argument has type 'test1::A const', but method is not marked const}} - void bar(int i); //expected-note {{candidate function not viable: 'this' argument has type 'test1::A const', but method is not marked const}} + void bar(double d); //expected-note {{candidate function not viable: 'this' argument has type 'const test1::A', but method is not marked const}} + void bar(int i); //expected-note {{candidate function not viable: 'this' argument has type 'const test1::A', but method is not marked const}} - void baz(A &d); // expected-note {{candidate function not viable: 1st argument ('test1::A const') would lose const qualifier}} - void baz(int i); // expected-note {{candidate function not viable: no known conversion from 'test1::A const' to 'int' for 1st argument}} + void baz(A &d); // expected-note {{candidate function not viable: 1st argument ('const test1::A') would lose const qualifier}} + void baz(int i); // expected-note {{candidate function not viable: no known conversion from 'const test1::A' to 'int' for 1st argument}} }; void test() { diff --git a/test/SemaCXX/overloaded-operator.cpp b/test/SemaCXX/overloaded-operator.cpp index 24f7f66129..a33ea5dede 100644 --- a/test/SemaCXX/overloaded-operator.cpp +++ b/test/SemaCXX/overloaded-operator.cpp @@ -38,7 +38,7 @@ bool operator==(A&, Z&); // expected-note 2{{candidate function}} void h(A a, const A ac, Z z) { make_A() == z; a == z; // expected-error{{use of overloaded operator '==' is ambiguous; candidates are:}} - ac == z; // expected-error{{invalid operands to binary expression ('A const' and 'Z')}} + ac == z; // expected-error{{invalid operands to binary expression ('const A' and 'Z')}} } struct B { diff --git a/test/SemaCXX/ref-init-ambiguous.cpp b/test/SemaCXX/ref-init-ambiguous.cpp index a8e95a3953..752a3484d0 100644 --- a/test/SemaCXX/ref-init-ambiguous.cpp +++ b/test/SemaCXX/ref-init-ambiguous.cpp @@ -14,15 +14,15 @@ struct C : B, A { }; void test(C c) { - const E2 &e2 = c; // expected-error {{reference initialization of type 'E2 const &' with initializer of type 'C' is ambiguous}} + const E2 &e2 = c; // expected-error {{reference initialization of type 'const E2 &' with initializer of type 'C' is ambiguous}} } void foo(const E2 &);// expected-note{{passing argument to parameter here}} const E2 & re(C c) { - foo(c); // expected-error {{reference initialization of type 'E2 const &' with initializer of type 'C' is ambiguous}} + foo(c); // expected-error {{reference initialization of type 'const E2 &' with initializer of type 'C' is ambiguous}} - return c; // expected-error {{reference initialization of type 'E2 const &' with initializer of type 'C' is ambiguous}} + return c; // expected-error {{reference initialization of type 'const E2 &' with initializer of type 'C' is ambiguous}} } diff --git a/test/SemaCXX/static-cast.cpp b/test/SemaCXX/static-cast.cpp index 9af200d574..c8639a9544 100644 --- a/test/SemaCXX/static-cast.cpp +++ b/test/SemaCXX/static-cast.cpp @@ -84,8 +84,8 @@ void t_529_5_8() (void)static_cast(*((A*)0)); // expected-error {{cannot cast 'A' to 'C1 &' via virtual base 'B'}} (void)static_cast((A*)0); // expected-error {{cannot cast 'A *' to 'D *' via virtual base 'B'}} (void)static_cast(*((A*)0)); // expected-error {{cannot cast 'A' to 'D &' via virtual base 'B'}} - (void)static_cast((const A*)0); // expected-error {{static_cast from 'A const *' to 'B *' casts away constness}} - (void)static_cast(*((const A*)0)); // expected-error {{static_cast from 'A const' to 'B &' casts away constness}} + (void)static_cast((const A*)0); // expected-error {{static_cast from 'const A *' to 'B *' casts away constness}} + (void)static_cast(*((const A*)0)); // expected-error {{static_cast from 'const A' to 'B &' casts away constness}} (void)static_cast((A*)0); // expected-error {{cannot cast private base class 'A' to 'E'}} (void)static_cast(*((A*)0)); // expected-error {{cannot cast private base class 'A' to 'E'}} (void)static_cast((A*)0); // expected-error {{ambiguous cast from base 'A' to derived 'H':\n struct A -> struct B -> struct G1 -> struct H\n struct A -> struct B -> struct G2 -> struct H}} diff --git a/test/SemaCXX/virtual-override.cpp b/test/SemaCXX/virtual-override.cpp index e07531f643..b1d2a3a05c 100644 --- a/test/SemaCXX/virtual-override.cpp +++ b/test/SemaCXX/virtual-override.cpp @@ -86,7 +86,7 @@ class A { class B : A { virtual a* f(); - virtual const a* g(); // expected-error{{return type of virtual function 'g' is not covariant with the return type of the function it overrides (class type 'T6::a const *' is more qualified than class type 'T6::a *'}} + virtual const a* g(); // expected-error{{return type of virtual function 'g' is not covariant with the return type of the function it overrides (class type 'const T6::a *' is more qualified than class type 'T6::a *'}} }; } diff --git a/test/SemaObjC/bad-receiver-1.m b/test/SemaObjC/bad-receiver-1.m index 33e1630864..fe3eecff2b 100644 --- a/test/SemaObjC/bad-receiver-1.m +++ b/test/SemaObjC/bad-receiver-1.m @@ -16,6 +16,6 @@ typedef const struct __CFString * CFStringRef; void func() { CFStringRef obj; - [obj self]; // expected-warning {{receiver type 'CFStringRef' (aka 'struct __CFString const *') is not 'id'}} \\ + [obj self]; // expected-warning {{receiver type 'CFStringRef' (aka 'const struct __CFString *') is not 'id'}} \\ expected-warning {{method '-self' not found}} } diff --git a/test/SemaTemplate/fun-template-def.cpp b/test/SemaTemplate/fun-template-def.cpp index 309921c0a6..0427781218 100644 --- a/test/SemaTemplate/fun-template-def.cpp +++ b/test/SemaTemplate/fun-template-def.cpp @@ -42,7 +42,7 @@ T f1(T t1, U u1, int i1) dummy d1 = sizeof(t1); // expected-error {{no viable conversion}} dummy d2 = offsetof(T, foo); // expected-error {{no viable conversion}} dummy d3 = __alignof(u1); // expected-error {{no viable conversion}} - i1 = typeid(t1); // expected-error {{assigning to 'int' from incompatible type 'std::type_info const'}} + i1 = typeid(t1); // expected-error {{assigning to 'int' from incompatible type 'const std::type_info'}} return u1; } diff --git a/test/SemaTemplate/temp_arg_nontype.cpp b/test/SemaTemplate/temp_arg_nontype.cpp index 6f515916e4..dc72db324b 100644 --- a/test/SemaTemplate/temp_arg_nontype.cpp +++ b/test/SemaTemplate/temp_arg_nontype.cpp @@ -58,7 +58,7 @@ template struct A4; // expected-note 2{{template parameter is decl X an_X; A4 *a15_1; // okay A4<*X_volatile_ptr> *a15_2; // expected-error{{non-type template argument does not refer to any declaration}} -A4 *15_3; // expected-error{{non-type template parameter of reference type 'X const &' cannot bind to template argument of type 'struct Y'}} \ +A4 *15_3; // expected-error{{non-type template parameter of reference type 'const X &' cannot bind to template argument of type 'struct Y'}} \ // FIXME: expected-error{{expected unqualified-id}} template struct A5; // expected-note{{template parameter is declared here}} -- 2.40.0