diff options
| author | Douglas Gregor <dgregor@apple.com> | 2012-02-09 08:15:36 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2012-02-09 08:15:36 +0000 |
| commit | 291af2b7e604a380c5db91865a3ba2a0e06d2151 (patch) | |
| tree | efb561d0decdc2a218825a563f41df91705535d4 /clang/test/CXX/expr/expr.prim/expr.prim.lambda | |
| parent | 89625491641600e278004b19f49495fb7ec19453 (diff) | |
| download | bcm5719-llvm-291af2b7e604a380c5db91865a3ba2a0e06d2151.tar.gz bcm5719-llvm-291af2b7e604a380c5db91865a3ba2a0e06d2151.zip | |
Add a test for the non-aggregaticity of lambda types per C++11
[expr.prim.lambda].
llvm-svn: 150164
Diffstat (limited to 'clang/test/CXX/expr/expr.prim/expr.prim.lambda')
| -rw-r--r-- | clang/test/CXX/expr/expr.prim/expr.prim.lambda/p3.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p3.cpp b/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p3.cpp new file mode 100644 index 00000000000..103f79d0158 --- /dev/null +++ b/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p3.cpp @@ -0,0 +1,7 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c++11 %s -verify + +void test_nonaggregate(int i) { + auto lambda = [i]() -> void {}; // expected-error{{lambda expressions are not supported yet}} \ + // expected-note 3{{candidate constructor}} + decltype(lambda) foo = { 1 }; // expected-error{{no matching constructor}} +} |

