Add a test for the non-aggregaticity of lambda types per C++11

[expr.prim.lambda].

llvm-svn: 150164
This commit is contained in:
Douglas Gregor 2012-02-09 08:15:36 +00:00
parent 8962549164
commit 291af2b7e6
1 changed files with 7 additions and 0 deletions

View File

@ -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}}
}