summaryrefslogtreecommitdiffstats
path: root/test/CXX/dcl.decl
diff options
context:
space:
mode:
Diffstat (limited to 'test/CXX/dcl.decl')
-rw-r--r--test/CXX/dcl.decl/dcl.init/dcl.init.aggr/p4.cpp6
-rw-r--r--test/CXX/dcl.decl/dcl.init/dcl.init.ref/basic.cpp1
-rw-r--r--test/CXX/dcl.decl/dcl.init/dcl.init.ref/p1.cpp1
-rw-r--r--test/CXX/dcl.decl/dcl.init/dcl.init.string/p1.cpp1
-rw-r--r--test/CXX/dcl.decl/dcl.init/p7.cpp14
-rw-r--r--test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p2.cpp1
-rw-r--r--test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p3.cpp6
-rw-r--r--test/CXX/dcl.decl/dcl.meaning/dcl.fct/p14.cpp1
-rw-r--r--test/CXX/dcl.decl/dcl.meaning/dcl.ref/p6-0x.cpp1
-rw-r--r--test/CXX/dcl.decl/dcl.meaning/p1.cpp14
-rw-r--r--test/CXX/dcl.decl/dcl.name/p1.cpp1
-rw-r--r--test/CXX/dcl.decl/p4-0x.cpp1
12 files changed, 38 insertions, 10 deletions
diff --git a/test/CXX/dcl.decl/dcl.init/dcl.init.aggr/p4.cpp b/test/CXX/dcl.decl/dcl.init/dcl.init.aggr/p4.cpp
index 1041571..2342807 100644
--- a/test/CXX/dcl.decl/dcl.init/dcl.init.aggr/p4.cpp
+++ b/test/CXX/dcl.decl/dcl.init/dcl.init.aggr/p4.cpp
@@ -16,3 +16,9 @@ void tf() {
// Allowed by GNU extension
int a4[] = {}; // expected-error {{zero size arrays}}
+
+struct Incomplete; // expected-note {{forward declaration of 'Incomplete'}}
+struct A {
+ Incomplete i; // expected-error {{field has incomplete type 'Incomplete'}}
+};
+A a[] = { 0 }; // PR13971: don't hang.
diff --git a/test/CXX/dcl.decl/dcl.init/dcl.init.ref/basic.cpp b/test/CXX/dcl.decl/dcl.init/dcl.init.ref/basic.cpp
index 885d11b..2c9cd88 100644
--- a/test/CXX/dcl.decl/dcl.init/dcl.init.ref/basic.cpp
+++ b/test/CXX/dcl.decl/dcl.init/dcl.init.ref/basic.cpp
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
+// expected-no-diagnostics
// PR5787
class C {
diff --git a/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p1.cpp b/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p1.cpp
index 20c059e..76053f0 100644
--- a/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p1.cpp
+++ b/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p1.cpp
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
+// expected-no-diagnostics
int g(int);
void f() {
int i;
diff --git a/test/CXX/dcl.decl/dcl.init/dcl.init.string/p1.cpp b/test/CXX/dcl.decl/dcl.init/dcl.init.string/p1.cpp
index 3631af1..878d2c6 100644
--- a/test/CXX/dcl.decl/dcl.init/dcl.init.string/p1.cpp
+++ b/test/CXX/dcl.decl/dcl.init/dcl.init.string/p1.cpp
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
+// expected-no-diagnostics
char x1[]("hello");
extern char x1[6];
diff --git a/test/CXX/dcl.decl/dcl.init/p7.cpp b/test/CXX/dcl.decl/dcl.init/p7.cpp
new file mode 100644
index 0000000..03216f4
--- /dev/null
+++ b/test/CXX/dcl.decl/dcl.init/p7.cpp
@@ -0,0 +1,14 @@
+// RUN: %clang_cc1 -std=c++11 -verify %s
+
+struct NotAggregateBase {};
+
+struct A : NotAggregateBase {
+private:
+ A() = default; // expected-note {{here}}
+};
+A a = {}; // expected-error {{calling a private constructor}}
+
+struct B : NotAggregateBase {
+ explicit B() = default; // expected-note {{here}}
+};
+B b = {}; // expected-error {{chosen constructor is explicit}}
diff --git a/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p2.cpp b/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p2.cpp
index 0a107eb..68aabca 100644
--- a/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p2.cpp
+++ b/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p2.cpp
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
+// expected-no-diagnostics
void point(int = 3, int = 4);
diff --git a/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p3.cpp b/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p3.cpp
index e9c5e0c..5467a92 100644
--- a/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p3.cpp
+++ b/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p3.cpp
@@ -1,9 +1,9 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
-void nondecl(int (*f)(int x = 5)) // {expected-error {{default arguments can only be specified}}}
+void nondecl(int (*f)(int x = 5)) // expected-error {{default arguments can only be specified}}
{
- void (*f2)(int = 17) // {expected-error {{default arguments can only be specified}}}
- = (void (*)(int = 42))f; // {expected-error {{default arguments can only be specified}}}
+ void (*f2)(int = 17) // expected-error {{default arguments can only be specified}}
+ = (void (*)(int = 42))f; // expected-error {{default arguments can only be specified}}
}
struct X0 {
diff --git a/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p14.cpp b/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p14.cpp
index 0e69521..bc249b5 100644
--- a/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p14.cpp
+++ b/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p14.cpp
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
+// expected-no-diagnostics
template<typename T> struct identity;
template<typename ...Types> struct tuple;
diff --git a/test/CXX/dcl.decl/dcl.meaning/dcl.ref/p6-0x.cpp b/test/CXX/dcl.decl/dcl.meaning/dcl.ref/p6-0x.cpp
index 4ce80bc..cd623df 100644
--- a/test/CXX/dcl.decl/dcl.meaning/dcl.ref/p6-0x.cpp
+++ b/test/CXX/dcl.decl/dcl.meaning/dcl.ref/p6-0x.cpp
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
+// expected-no-diagnostics
template<typename T, typename U>
struct is_same {
diff --git a/test/CXX/dcl.decl/dcl.meaning/p1.cpp b/test/CXX/dcl.decl/dcl.meaning/p1.cpp
index 3672ea0..ec9a261 100644
--- a/test/CXX/dcl.decl/dcl.meaning/p1.cpp
+++ b/test/CXX/dcl.decl/dcl.meaning/p1.cpp
@@ -7,7 +7,7 @@ namespace PR8019 {
struct PR8019::x { int x; }; // expected-error{{non-friend class member 'x' cannot have a qualified name}}
struct inner;
- struct y::inner { }; // expected-warning{{extra qualification on member 'inner'}}
+ struct y::inner { }; // expected-error{{extra qualification on member 'inner'}}
template<typename T>
struct PR8019::x2 { }; // expected-error{{non-friend class member 'x2' cannot have a qualified name}}
@@ -16,7 +16,7 @@ namespace PR8019 {
struct inner_template;
template<typename T>
- struct y::inner_template { }; // expected-warning{{extra qualification on member 'inner_template'}}
+ struct y::inner_template { }; // expected-error{{extra qualification on member 'inner_template'}}
};
}
@@ -29,9 +29,9 @@ namespace NS {
template<typename T> void wibble(T);
}
namespace NS {
- void NS::foo() {} // expected-warning{{extra qualification on member 'foo'}}
- int NS::bar; // expected-warning{{extra qualification on member 'bar'}}
- struct NS::X { }; // expected-warning{{extra qualification on member 'X'}}
- template<typename T> struct NS::Y; // expected-warning{{extra qualification on member 'Y'}}
- template<typename T> void NS::wibble(T) { } // expected-warning{{extra qualification on member 'wibble'}}
+ void NS::foo() {} // expected-error{{extra qualification on member 'foo'}}
+ int NS::bar; // expected-error{{extra qualification on member 'bar'}}
+ struct NS::X { }; // expected-error{{extra qualification on member 'X'}}
+ template<typename T> struct NS::Y; // expected-error{{extra qualification on member 'Y'}}
+ template<typename T> void NS::wibble(T) { } // expected-error{{extra qualification on member 'wibble'}}
}
diff --git a/test/CXX/dcl.decl/dcl.name/p1.cpp b/test/CXX/dcl.decl/dcl.name/p1.cpp
index 9838b4f..e032a7f 100644
--- a/test/CXX/dcl.decl/dcl.name/p1.cpp
+++ b/test/CXX/dcl.decl/dcl.name/p1.cpp
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
+// expected-no-diagnostics
namespace pr6200 {
struct v {};
diff --git a/test/CXX/dcl.decl/p4-0x.cpp b/test/CXX/dcl.decl/p4-0x.cpp
index 98c33b2..35177a0 100644
--- a/test/CXX/dcl.decl/p4-0x.cpp
+++ b/test/CXX/dcl.decl/p4-0x.cpp
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
+// expected-no-diagnostics
struct X {
void f() &;
OpenPOWER on IntegriCloud