summaryrefslogtreecommitdiffstats
path: root/test/CXX/expr/expr.prim/expr.prim.lambda/p3.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CXX/expr/expr.prim/expr.prim.lambda/p3.cpp')
-rw-r--r--test/CXX/expr/expr.prim/expr.prim.lambda/p3.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/CXX/expr/expr.prim/expr.prim.lambda/p3.cpp b/test/CXX/expr/expr.prim/expr.prim.lambda/p3.cpp
index 562f92a..80771d7 100644
--- a/test/CXX/expr/expr.prim/expr.prim.lambda/p3.cpp
+++ b/test/CXX/expr/expr.prim/expr.prim.lambda/p3.cpp
@@ -1,6 +1,11 @@
// RUN: %clang_cc1 -fsyntax-only -std=c++11 %s -verify
void test_nonaggregate(int i) {
- auto lambda = [i]() -> void {}; // expected-note 3{{candidate constructor}}
+ auto lambda = [i]() -> void {}; // expected-note 2{{candidate constructor}}
decltype(lambda) foo = { 1 }; // expected-error{{no matching constructor}}
+ static_assert(!__is_literal(decltype(lambda)), "");
+
+ auto lambda2 = []{}; // expected-note 2{{candidate constructor}}
+ decltype(lambda2) bar = {}; // expected-error{{no matching constructor}}
+ static_assert(!__is_literal(decltype(lambda2)), "");
}
OpenPOWER on IntegriCloud