summaryrefslogtreecommitdiff
path: root/test/CXX/expr/expr.prim
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2012-12-02 13:20:44 +0000
committerDimitry Andric <dim@FreeBSD.org>2012-12-02 13:20:44 +0000
commit13cc256e404620c1de0cbcc4e43ce1e2dbbc4898 (patch)
tree2732d02d7d51218d6eed98ac7fcfc5b8794896b5 /test/CXX/expr/expr.prim
parent657bc3d9848e3be92029b2416031340988cd0111 (diff)
Notes
Diffstat (limited to 'test/CXX/expr/expr.prim')
-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
6 files changed, 21 insertions, 2 deletions
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 030c90c525c0e..b84cec61c313a 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 678fa4b964d49..6358215a55594 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 c4deba9c97439..b4b1605ab0025 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 930a4b32fa06c..93c2805497f34 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 4487cfc4ba282..17eb841fc3fcf 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 7139058cd0891..bc2c9997379a6 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&);