diff options
| author | Douglas Gregor <dgregor@apple.com> | 2009-12-20 22:01:25 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2009-12-20 22:01:25 +0000 |
| commit | 39c778b44348c530ef7487915f60e823d2fbc383 (patch) | |
| tree | b393891a51975dc24e935416913b4ea3dbe59fd0 /clang/test | |
| parent | 1b6d10555ff70efcc44b8bf25d4755d88a15d48c (diff) | |
| download | bcm5719-llvm-39c778b44348c530ef7487915f60e823d2fbc383.tar.gz bcm5719-llvm-39c778b44348c530ef7487915f60e823d2fbc383.zip | |
Switch default-initialization of variables of class type (or array thereof) over to InitializationSequence. I could swear that this fixes a PR somewhere, but I couldn't figure out which one
llvm-svn: 91796
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/CXX/temp/temp.spec/temp.expl.spec/p15.cpp | 2 | ||||
| -rw-r--r-- | clang/test/CXX/temp/temp.spec/temp.expl.spec/p4.cpp | 4 | ||||
| -rw-r--r-- | clang/test/CXX/temp/temp.spec/temp.explicit/p1.cpp | 4 | ||||
| -rw-r--r-- | clang/test/SemaCXX/constructor-recovery.cpp | 7 | ||||
| -rw-r--r-- | clang/test/SemaCXX/default2.cpp | 2 | ||||
| -rw-r--r-- | clang/test/SemaCXX/deleted-function.cpp | 4 | ||||
| -rw-r--r-- | clang/test/SemaCXX/direct-initializer.cpp | 6 | ||||
| -rw-r--r-- | clang/test/SemaTemplate/explicit-instantiation.cpp | 4 | ||||
| -rw-r--r-- | clang/test/SemaTemplate/instantiate-static-var.cpp | 2 |
9 files changed, 17 insertions, 18 deletions
diff --git a/clang/test/CXX/temp/temp.spec/temp.expl.spec/p15.cpp b/clang/test/CXX/temp/temp.spec/temp.expl.spec/p15.cpp index 7e87e576ca9..6e7f80842ec 100644 --- a/clang/test/CXX/temp/temp.spec/temp.expl.spec/p15.cpp +++ b/clang/test/CXX/temp/temp.spec/temp.expl.spec/p15.cpp @@ -1,7 +1,7 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s struct NonDefaultConstructible { - NonDefaultConstructible(const NonDefaultConstructible&); + NonDefaultConstructible(const NonDefaultConstructible&); // expected-note{{candidate function}} }; template<typename T, typename U> diff --git a/clang/test/CXX/temp/temp.spec/temp.expl.spec/p4.cpp b/clang/test/CXX/temp/temp.spec/temp.expl.spec/p4.cpp index 9e3401a1aef..3eaf89689a2 100644 --- a/clang/test/CXX/temp/temp.spec/temp.expl.spec/p4.cpp +++ b/clang/test/CXX/temp/temp.spec/temp.expl.spec/p4.cpp @@ -1,7 +1,7 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s -struct IntHolder { // expected-note{{here}} - IntHolder(int); +struct IntHolder { // expected-note{{here}} // expected-note 2{{candidate function}} + IntHolder(int); // expected-note 2{{candidate function}} }; template<typename T, typename U> diff --git a/clang/test/CXX/temp/temp.spec/temp.explicit/p1.cpp b/clang/test/CXX/temp/temp.spec/temp.explicit/p1.cpp index 718812be30a..7c7ca6cf329 100644 --- a/clang/test/CXX/temp/temp.spec/temp.explicit/p1.cpp +++ b/clang/test/CXX/temp/temp.spec/temp.explicit/p1.cpp @@ -48,8 +48,8 @@ template void X1<int>::f<>(int&, int*); // expected-note{{instantiation}} // Explicitly instantiate members of a class template struct Incomplete; // expected-note{{forward declaration}} -struct NonDefaultConstructible { - NonDefaultConstructible(int); +struct NonDefaultConstructible { // expected-note{{candidate function}} + NonDefaultConstructible(int); // expected-note{{candidate function}} }; template<typename T, typename U> diff --git a/clang/test/SemaCXX/constructor-recovery.cpp b/clang/test/SemaCXX/constructor-recovery.cpp index 8e006203980..c1bb4362835 100644 --- a/clang/test/SemaCXX/constructor-recovery.cpp +++ b/clang/test/SemaCXX/constructor-recovery.cpp @@ -1,10 +1,9 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s -struct C { // expected-note {{candidate function}} - virtual C() = 0; // expected-error{{constructor cannot be declared 'virtual'}} \ - expected-note {{candidate function}} +struct C { + virtual C() = 0; // expected-error{{constructor cannot be declared 'virtual'}} }; void f() { - C c; // expected-error {{call to constructor of 'c' is ambiguous}} + C c; } diff --git a/clang/test/SemaCXX/default2.cpp b/clang/test/SemaCXX/default2.cpp index 58f35dcec31..eda4be29192 100644 --- a/clang/test/SemaCXX/default2.cpp +++ b/clang/test/SemaCXX/default2.cpp @@ -82,7 +82,7 @@ int Y::mem4(int i = a) // expected-error{{invalid use of nonstatic data member ' // constructors. class Z { public: - Z(Z&, int i = 17); // expected-note 2 {{candidate function}} + Z(Z&, int i = 17); // expected-note 3 {{candidate function}} void f(Z& z) { Z z2; // expected-error{{no matching constructor for initialization}} diff --git a/clang/test/SemaCXX/deleted-function.cpp b/clang/test/SemaCXX/deleted-function.cpp index 572ef343309..d9df1bf5b05 100644 --- a/clang/test/SemaCXX/deleted-function.cpp +++ b/clang/test/SemaCXX/deleted-function.cpp @@ -16,7 +16,7 @@ void ov(int) {} // expected-note {{candidate function}} void ov(double) = delete; // expected-note {{candidate function has been explicitly deleted}} struct WithDel { - WithDel() = delete; // expected-note {{candidate function has been explicitly deleted}} + WithDel() = delete; // expected-note {{function has been explicitly marked deleted here}} void fn() = delete; // expected-note {{function has been explicitly marked deleted here}} operator int() = delete; // expected-note {{function has been explicitly marked deleted here}} void operator +(int) = delete; @@ -29,7 +29,7 @@ void test() { ov(1); ov(1.0); // expected-error {{call to deleted function 'ov'}} - WithDel dd; // expected-error {{call to deleted constructor of 'dd'}} + WithDel dd; // expected-error {{call to deleted constructor of 'struct WithDel'}} WithDel *d = 0; d->fn(); // expected-error {{attempt to use a deleted function}} 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 0930ff798fb..1a87a3edf33 100644 --- a/clang/test/SemaCXX/direct-initializer.cpp +++ b/clang/test/SemaCXX/direct-initializer.cpp @@ -20,9 +20,9 @@ public: X(float, Y); // expected-note{{candidate function}} }; -class Z { +class Z { // expected-note{{candidate function}} public: - Z(int); + Z(int); // expected-note{{candidate function}} }; void g() { @@ -32,7 +32,7 @@ void g() { Y y(1.0); X x4(3.14, y); - Z z; // expected-error{{no matching constructor for initialization of 'z'}} + Z z; // expected-error{{no matching constructor for initialization of 'class Z'}} } struct Base { diff --git a/clang/test/SemaTemplate/explicit-instantiation.cpp b/clang/test/SemaTemplate/explicit-instantiation.cpp index 9c75cb7d610..fbb5edbefd6 100644 --- a/clang/test/SemaTemplate/explicit-instantiation.cpp +++ b/clang/test/SemaTemplate/explicit-instantiation.cpp @@ -25,8 +25,8 @@ T X0<T>::value; // expected-error{{no matching constructor}} template int X0<int>::value; -struct NotDefaultConstructible { - NotDefaultConstructible(int); +struct NotDefaultConstructible { // expected-note{{candidate function}} + NotDefaultConstructible(int); // expected-note{{candidate function}} }; template NotDefaultConstructible X0<NotDefaultConstructible>::value; // expected-note{{instantiation}} diff --git a/clang/test/SemaTemplate/instantiate-static-var.cpp b/clang/test/SemaTemplate/instantiate-static-var.cpp index bd298fc63a8..8a2f34d475a 100644 --- a/clang/test/SemaTemplate/instantiate-static-var.cpp +++ b/clang/test/SemaTemplate/instantiate-static-var.cpp @@ -30,7 +30,7 @@ T Z<T>::value; // expected-error{{no matching constructor}} struct DefCon {}; struct NoDefCon { - NoDefCon(const NoDefCon&); + NoDefCon(const NoDefCon&); // expected-note{{candidate function}} }; void test() { |

