diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-12-19 03:01:41 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-12-19 03:01:41 +0000 |
commit | 7abfbdbc97ad8e7f340789f751df1e32b10118b4 (patch) | |
tree | c98c3dd47e10bceea032ec5fb2b44306f109dacd /test/SemaTemplate/fun-template-def.cpp | |
parent | 29f1a6070ac35fcbea9241c843df7f3f7c5c3228 (diff) | |
download | clang-7abfbdbc97ad8e7f340789f751df1e32b10118b4.tar.gz clang-7abfbdbc97ad8e7f340789f751df1e32b10118b4.tar.bz2 clang-7abfbdbc97ad8e7f340789f751df1e32b10118b4.tar.xz |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91750 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/fun-template-def.cpp')
-rw-r--r-- | test/SemaTemplate/fun-template-def.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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}} |