2012-02-09 16:15:36 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -std=c++11 %s -verify
|
|
|
|
|
|
|
|
void test_nonaggregate(int i) {
|
2014-12-11 04:04:48 +08:00
|
|
|
auto lambda = [i]() -> void {}; // expected-note 2{{candidate constructor}}
|
2012-02-09 16:15:36 +08:00
|
|
|
decltype(lambda) foo = { 1 }; // expected-error{{no matching constructor}}
|
2014-10-08 02:01:33 +08:00
|
|
|
static_assert(!__is_literal(decltype(lambda)), "");
|
|
|
|
|
2014-12-11 04:04:48 +08:00
|
|
|
auto lambda2 = []{}; // expected-note 2{{candidate constructor}}
|
|
|
|
decltype(lambda2) bar = {}; // expected-error{{no matching constructor}}
|
2014-10-08 02:01:33 +08:00
|
|
|
static_assert(!__is_literal(decltype(lambda2)), "");
|
2012-02-09 16:15:36 +08:00
|
|
|
}
|