summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/default-expr-arguments.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-12-19 03:01:41 +0000
committerDouglas Gregor <dgregor@apple.com>2009-12-19 03:01:41 +0000
commita4b592a7d5892001b53f51fe936c77d340e6df38 (patch)
treeed409ff8cc553a6b1fba5db61af72bbefc8e0c8d /clang/test/SemaTemplate/default-expr-arguments.cpp
parent04cc307eddae4681709cb4f019e5f9363e0506c3 (diff)
downloadbcm5719-llvm-a4b592a7d5892001b53f51fe936c77d340e6df38.tar.gz
bcm5719-llvm-a4b592a7d5892001b53f51fe936c77d340e6df38.zip
Switch more of Sema::CheckInitializerTypes over to
InitializationSequence. Specially, switch initialization of a C++ class type (either copy- or direct-initialization). Also, make sure that we create an elidable copy-construction when performing copy initialization of a C++ class variable. Fixes PR5826. llvm-svn: 91750
Diffstat (limited to 'clang/test/SemaTemplate/default-expr-arguments.cpp')
-rw-r--r--clang/test/SemaTemplate/default-expr-arguments.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/test/SemaTemplate/default-expr-arguments.cpp b/clang/test/SemaTemplate/default-expr-arguments.cpp
index 4c2f5465dc8..df3cc96ba21 100644
--- a/clang/test/SemaTemplate/default-expr-arguments.cpp
+++ b/clang/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> { };
OpenPOWER on IntegriCloud