aboutsummaryrefslogtreecommitdiff
path: root/test/CXX/temp/temp.spec/temp.expl.spec/p4.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CXX/temp/temp.spec/temp.expl.spec/p4.cpp')
-rw-r--r--test/CXX/temp/temp.spec/temp.expl.spec/p4.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/test/CXX/temp/temp.spec/temp.expl.spec/p4.cpp b/test/CXX/temp/temp.spec/temp.expl.spec/p4.cpp
index 772aef6b585a..ac040ccb3d64 100644
--- a/test/CXX/temp/temp.spec/temp.expl.spec/p4.cpp
+++ b/test/CXX/temp/temp.spec/temp.expl.spec/p4.cpp
@@ -1,6 +1,8 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
// RUN: %clang_cc1 -fsyntax-only -verify %s
-struct IntHolder { // expected-note{{here}} // expected-note 2{{candidate constructor (the implicit copy constructor)}}
+struct IntHolder { // expected-note 0-1{{here}} expected-note 2-4{{candidate constructor (the implicit}}
IntHolder(int); // expected-note 2{{candidate constructor}}
};
@@ -12,8 +14,13 @@ struct X { // expected-note{{here}}
void g() { }
- struct Inner { // expected-error{{implicit default}}
+ struct Inner {
+#if __cplusplus >= 201103L
+ T value; // expected-note {{has no default constructor}}
+#else
+ // expected-error@-4 {{implicit default}}
T value; // expected-note {{member is declared here}}
+#endif
};
static T value;
@@ -26,7 +33,12 @@ IntHolder &test_X_IntHolderInt(X<IntHolder, int> xih) {
xih.g(); // okay
xih.f(); // expected-note{{instantiation}}
- X<IntHolder, int>::Inner inner; // expected-note {{first required here}}
+ X<IntHolder, int>::Inner inner;
+#if __cplusplus >= 201103L
+ // expected-error@-2 {{call to implicitly-deleted}}
+#else
+ // expected-note@-4 {{first required here}}
+#endif
return X<IntHolder, int>::value; // expected-note{{instantiation}}
}