summaryrefslogtreecommitdiffstats
path: root/test/CXX/expr
diff options
context:
space:
mode:
Diffstat (limited to 'test/CXX/expr')
-rw-r--r--test/CXX/expr/expr.cast/p4-0x.cpp1
-rw-r--r--test/CXX/expr/expr.const/p3-0x-nowarn.cpp1
-rw-r--r--test/CXX/expr/expr.const/p5-0x.cpp8
-rw-r--r--test/CXX/expr/expr.post/expr.const.cast/p1-0x.cpp1
-rw-r--r--test/CXX/expr/expr.post/expr.ref/p3.cpp1
-rw-r--r--test/CXX/expr/expr.post/expr.static.cast/p3-0x.cpp1
-rw-r--r--test/CXX/expr/expr.post/expr.static.cast/p9-0x.cpp1
-rw-r--r--test/CXX/expr/expr.post/expr.type.conv/p1-0x.cpp1
-rw-r--r--test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp4
-rw-r--r--test/CXX/expr/expr.prim/expr.prim.lambda/p14.cpp15
-rw-r--r--test/CXX/expr/expr.prim/expr.prim.lambda/p15.cpp1
-rw-r--r--test/CXX/expr/expr.prim/expr.prim.lambda/p18.cpp1
-rw-r--r--test/CXX/expr/expr.prim/expr.prim.lambda/p20.cpp1
-rw-r--r--test/CXX/expr/expr.prim/expr.prim.lambda/p21.cpp1
-rw-r--r--test/CXX/expr/expr.unary/expr.unary.noexcept/sema.cpp1
-rw-r--r--test/CXX/expr/expr.unary/expr.unary.op/p3.cpp1
-rw-r--r--test/CXX/expr/p8.cpp1
-rw-r--r--test/CXX/expr/p9.cpp1
18 files changed, 36 insertions, 6 deletions
diff --git a/test/CXX/expr/expr.cast/p4-0x.cpp b/test/CXX/expr/expr.cast/p4-0x.cpp
index 96bf5f9..76ac318 100644
--- a/test/CXX/expr/expr.cast/p4-0x.cpp
+++ b/test/CXX/expr/expr.cast/p4-0x.cpp
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
+// expected-no-diagnostics
struct X { };
struct Y : X { };
diff --git a/test/CXX/expr/expr.const/p3-0x-nowarn.cpp b/test/CXX/expr/expr.const/p3-0x-nowarn.cpp
index c891374..7d12ced 100644
--- a/test/CXX/expr/expr.const/p3-0x-nowarn.cpp
+++ b/test/CXX/expr/expr.const/p3-0x-nowarn.cpp
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -fsyntax-only -std=c++11 -Wno-c++11-narrowing -verify %s
+// expected-no-diagnostics
// <rdar://problem/11121178>
void f(int x) {
diff --git a/test/CXX/expr/expr.const/p5-0x.cpp b/test/CXX/expr/expr.const/p5-0x.cpp
index 60fabe3..bdb2b23 100644
--- a/test/CXX/expr/expr.const/p5-0x.cpp
+++ b/test/CXX/expr/expr.const/p5-0x.cpp
@@ -61,10 +61,10 @@ enum NotFixed {
// [dcl.align]p2: When the alignment-specifier is of the form
// alignas(assignment-expression), the assignment-expression shall be an
// integral constant expression
-int alignas(ok) alignas1;
-int alignas(incomplete) alignas2; // expected-error {{incomplete}}
-int alignas(expl) alignas3; // expected-error {{explicit conversion}}
-int alignas(ambig) alignas4; // expected-error {{ambiguous conversion}}
+alignas(ok) int alignas1;
+alignas(incomplete) int alignas2; // expected-error {{incomplete}}
+alignas(expl) int alignas3; // expected-error {{explicit conversion}}
+alignas(ambig) int alignas4; // expected-error {{ambiguous conversion}}
// [dcl.array]p1: If the constant-expression is present, it shall be an integral
// constant expression
diff --git a/test/CXX/expr/expr.post/expr.const.cast/p1-0x.cpp b/test/CXX/expr/expr.post/expr.const.cast/p1-0x.cpp
index 6ba8d51..be89876 100644
--- a/test/CXX/expr/expr.post/expr.const.cast/p1-0x.cpp
+++ b/test/CXX/expr/expr.post/expr.const.cast/p1-0x.cpp
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
+// expected-no-diagnostics
// The result of the expression const_cast<T>(v) is of type T. If T is
// an lvalue reference to object type, the result is an lvalue; if T
diff --git a/test/CXX/expr/expr.post/expr.ref/p3.cpp b/test/CXX/expr/expr.post/expr.ref/p3.cpp
index 98771d3..db33c01 100644
--- a/test/CXX/expr/expr.post/expr.ref/p3.cpp
+++ b/test/CXX/expr/expr.post/expr.ref/p3.cpp
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -verify -fsyntax-only %s
+// expected-no-diagnostics
template<typename T> struct Node {
int lhs;
diff --git a/test/CXX/expr/expr.post/expr.static.cast/p3-0x.cpp b/test/CXX/expr/expr.post/expr.static.cast/p3-0x.cpp
index 9ef15e6..830ccda 100644
--- a/test/CXX/expr/expr.post/expr.static.cast/p3-0x.cpp
+++ b/test/CXX/expr/expr.post/expr.static.cast/p3-0x.cpp
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
+// expected-no-diagnostics
// A glvalue of type "cv1 T1" can be cast to type "rvalue reference to
// cv2 T2" if "cv2 T2" is reference-compatible with "cv1 T1" (8.5.3).
diff --git a/test/CXX/expr/expr.post/expr.static.cast/p9-0x.cpp b/test/CXX/expr/expr.post/expr.static.cast/p9-0x.cpp
index 731c508..c624c7e 100644
--- a/test/CXX/expr/expr.post/expr.static.cast/p9-0x.cpp
+++ b/test/CXX/expr/expr.post/expr.static.cast/p9-0x.cpp
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
+// expected-no-diagnostics
enum class EC { ec1 };
diff --git a/test/CXX/expr/expr.post/expr.type.conv/p1-0x.cpp b/test/CXX/expr/expr.post/expr.type.conv/p1-0x.cpp
index 253744e..568c61b 100644
--- a/test/CXX/expr/expr.post/expr.type.conv/p1-0x.cpp
+++ b/test/CXX/expr/expr.post/expr.type.conv/p1-0x.cpp
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
+// expected-no-diagnostics
struct foo {
foo();
diff --git a/test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp b/test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp
index 030c90c..b84cec6 100644
--- a/test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp
+++ b/test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp
@@ -91,11 +91,11 @@ namespace Static {
namespace PR12564 {
struct Base {
- void bar(Base&) {} // unexpected-note {{here}}
+ void bar(Base&) {} // FIXME: expected-note {{here}}
};
struct Derived : Base {
// FIXME: This should be accepted.
- void foo(Derived& d) noexcept(noexcept(d.bar(d))) {} // unexpected-error {{cannot bind to a value of unrelated type}}
+ void foo(Derived& d) noexcept(noexcept(d.bar(d))) {} // expected-error {{cannot bind to a value of unrelated type}}
};
}
diff --git a/test/CXX/expr/expr.prim/expr.prim.lambda/p14.cpp b/test/CXX/expr/expr.prim/expr.prim.lambda/p14.cpp
index 678fa4b..6358215 100644
--- a/test/CXX/expr/expr.prim/expr.prim.lambda/p14.cpp
+++ b/test/CXX/expr/expr.prim/expr.prim.lambda/p14.cpp
@@ -73,3 +73,18 @@ struct ExpectedThisLayout {
static_assert(sizeof(x) == sizeof(ExpectedThisLayout), "Layout mismatch!");
}
};
+
+struct CaptureArrayAndThis {
+ int value;
+
+ void f() {
+ int array[3];
+ [=]() -> int {
+ int result = value;
+ for (unsigned i = 0; i < 3; ++i)
+ result += array[i];
+ return result;
+ }();
+ }
+};
+
diff --git a/test/CXX/expr/expr.prim/expr.prim.lambda/p15.cpp b/test/CXX/expr/expr.prim/expr.prim.lambda/p15.cpp
index c4deba9..b4b1605 100644
--- a/test/CXX/expr/expr.prim/expr.prim.lambda/p15.cpp
+++ b/test/CXX/expr/expr.prim/expr.prim.lambda/p15.cpp
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -fsyntax-only -std=c++11 %s -verify
+// expected-no-diagnostics
class NonCopyable {
NonCopyable(const NonCopyable&);
diff --git a/test/CXX/expr/expr.prim/expr.prim.lambda/p18.cpp b/test/CXX/expr/expr.prim/expr.prim.lambda/p18.cpp
index 930a4b3..93c2805 100644
--- a/test/CXX/expr/expr.prim/expr.prim.lambda/p18.cpp
+++ b/test/CXX/expr/expr.prim/expr.prim.lambda/p18.cpp
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -std=c++11 %s -Wunused -verify
+// expected-no-diagnostics
template<typename T, typename U>
struct is_same {
diff --git a/test/CXX/expr/expr.prim/expr.prim.lambda/p20.cpp b/test/CXX/expr/expr.prim/expr.prim.lambda/p20.cpp
index 4487cfc..17eb841 100644
--- a/test/CXX/expr/expr.prim/expr.prim.lambda/p20.cpp
+++ b/test/CXX/expr/expr.prim/expr.prim.lambda/p20.cpp
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -std=c++11 %s -Wunused -verify
+// expected-no-diagnostics
template<typename T>
void destroy(T* ptr) {
diff --git a/test/CXX/expr/expr.prim/expr.prim.lambda/p21.cpp b/test/CXX/expr/expr.prim/expr.prim.lambda/p21.cpp
index 7139058..bc2c999 100644
--- a/test/CXX/expr/expr.prim/expr.prim.lambda/p21.cpp
+++ b/test/CXX/expr/expr.prim/expr.prim.lambda/p21.cpp
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -fsyntax-only -std=c++11 %s -verify
+// expected-no-diagnostics
struct DirectInitOnly {
explicit DirectInitOnly(DirectInitOnly&);
diff --git a/test/CXX/expr/expr.unary/expr.unary.noexcept/sema.cpp b/test/CXX/expr/expr.unary/expr.unary.noexcept/sema.cpp
index b5de1a7..1f5969d 100644
--- a/test/CXX/expr/expr.unary/expr.unary.noexcept/sema.cpp
+++ b/test/CXX/expr/expr.unary/expr.unary.noexcept/sema.cpp
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -fsyntax-only -verify -std=c++11 -fms-extensions %s
+// expected-no-diagnostics
#define P(e) static_assert(noexcept(e), "expected nothrow")
#define N(e) static_assert(!noexcept(e), "expected throw")
diff --git a/test/CXX/expr/expr.unary/expr.unary.op/p3.cpp b/test/CXX/expr/expr.unary/expr.unary.op/p3.cpp
index 2dd6b23..08ab0ca 100644
--- a/test/CXX/expr/expr.unary/expr.unary.op/p3.cpp
+++ b/test/CXX/expr/expr.unary/expr.unary.op/p3.cpp
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -fsyntax-only %s -verify
+// expected-no-diagnostics
namespace rdar10544564 {
// Check that we don't attempt to use an overloaded operator& when
diff --git a/test/CXX/expr/p8.cpp b/test/CXX/expr/p8.cpp
index 2f6c094..471d1c5 100644
--- a/test/CXX/expr/p8.cpp
+++ b/test/CXX/expr/p8.cpp
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
+// expected-no-diagnostics
int a0;
const volatile int a1 = 2;
diff --git a/test/CXX/expr/p9.cpp b/test/CXX/expr/p9.cpp
index 803b0cc..4c60b8b 100644
--- a/test/CXX/expr/p9.cpp
+++ b/test/CXX/expr/p9.cpp
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
+// expected-no-diagnostics
// floating-point overloads
OpenPOWER on IntegriCloud