aboutsummaryrefslogtreecommitdiff
path: root/test/SemaTemplate
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaTemplate')
-rw-r--r--test/SemaTemplate/default-expr-arguments.cpp8
-rw-r--r--test/SemaTemplate/fun-template-def.cpp4
2 files changed, 6 insertions, 6 deletions
diff --git a/test/SemaTemplate/default-expr-arguments.cpp b/test/SemaTemplate/default-expr-arguments.cpp
index 4c2f5465dc..df3cc96ba2 100644
--- a/test/SemaTemplate/default-expr-arguments.cpp
+++ b/test/SemaTemplate/default-expr-arguments.cpp
@@ -6,9 +6,9 @@ class C { C(int a0 = 0); };
template<>
C<char>::C(int a0);
-struct S { };
+struct S { }; // expected-note 3 {{candidate function}}
-template<typename T> void f1(T a, T b = 10) { } // expected-error{{cannot initialize 'b' with an rvalue of type 'int'}}
+template<typename T> void f1(T a, T b = 10) { } // expected-error{{no viable conversion}}
template<typename T> void f2(T a, T b = T()) { }
@@ -26,8 +26,8 @@ void g() {
}
template<typename T> struct F {
- F(T t = 10); // expected-error{{cannot initialize 't' with an rvalue of type 'int'}}
- void f(T t = 10); // expected-error{{cannot initialize 't' with an rvalue of type 'int'}}
+ F(T t = 10); // expected-error{{no viable conversion}}
+ void f(T t = 10); // expected-error{{no viable conversion}}
};
struct FD : F<int> { };
diff --git a/test/SemaTemplate/fun-template-def.cpp b/test/SemaTemplate/fun-template-def.cpp
index 867b1c643e..cc28553ebc 100644
--- a/test/SemaTemplate/fun-template-def.cpp
+++ b/test/SemaTemplate/fun-template-def.cpp
@@ -8,7 +8,7 @@
// Fake typeid, lacking a typeinfo header.
namespace std { class type_info {}; }
-struct dummy {};
+struct dummy {}; // expected-note{{candidate function}}
template<typename T>
int f0(T x) {
@@ -40,7 +40,7 @@ T f1(T t1, U u1, int i1)
delete t1;
dummy d1 = sizeof(t1); // FIXME: delayed checking okay?
- dummy d2 = offsetof(T, foo); // expected-error {{cannot initialize 'd2'}}
+ dummy d2 = offsetof(T, foo); // expected-error {{no viable conversion}}
dummy d3 = __alignof(u1); // FIXME: delayed checking okay?
i1 = typeid(t1); // expected-error {{incompatible type assigning}}