p3.cpp revision 0e2c34f92f00628d48968dfea096d36381f494cb
1// RUN: %clang_cc1 -fsyntax-only -std=c++11 %s -verify 2 3void 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