xref: /minix3/external/bsd/llvm/dist/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p3.cpp (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1 // RUN: %clang_cc1 -fsyntax-only -std=c++11 %s -verify
2 
test_nonaggregate(int i)3 void test_nonaggregate(int i) {
4   auto lambda = [i]() -> void {}; // expected-note 2{{candidate constructor}}
5   decltype(lambda) foo = { 1 }; // expected-error{{no matching constructor}}
6   static_assert(!__is_literal(decltype(lambda)), "");
7 
8   auto lambda2 = []{}; // expected-note 2{{candidate constructor}}
9   decltype(lambda2) bar = {}; // expected-error{{no matching constructor}}
10   static_assert(!__is_literal(decltype(lambda2)), "");
11 }
12