diff options
author | dim <dim@FreeBSD.org> | 2012-12-02 13:20:44 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-12-02 13:20:44 +0000 |
commit | 056abd2059c65a3e908193aeae16fad98017437c (patch) | |
tree | 2732d02d7d51218d6eed98ac7fcfc5b8794896b5 /test/CXX/expr/expr.prim/expr.prim.lambda | |
parent | cc73504950eb7b5dff2dded9bedd67bc36d64641 (diff) | |
download | FreeBSD-src-056abd2059c65a3e908193aeae16fad98017437c.zip FreeBSD-src-056abd2059c65a3e908193aeae16fad98017437c.tar.gz |
Vendor import of clang release_32 branch r168974 (effectively, 3.2 RC2):
http://llvm.org/svn/llvm-project/cfe/branches/release_32@168974
Diffstat (limited to 'test/CXX/expr/expr.prim/expr.prim.lambda')
-rw-r--r-- | test/CXX/expr/expr.prim/expr.prim.lambda/p14.cpp | 15 | ||||
-rw-r--r-- | test/CXX/expr/expr.prim/expr.prim.lambda/p15.cpp | 1 | ||||
-rw-r--r-- | test/CXX/expr/expr.prim/expr.prim.lambda/p18.cpp | 1 | ||||
-rw-r--r-- | test/CXX/expr/expr.prim/expr.prim.lambda/p20.cpp | 1 | ||||
-rw-r--r-- | test/CXX/expr/expr.prim/expr.prim.lambda/p21.cpp | 1 |
5 files changed, 19 insertions, 0 deletions
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&); |