summaryrefslogtreecommitdiffstats
path: root/test/PCH/cxx11-lambdas.mm
diff options
context:
space:
mode:
Diffstat (limited to 'test/PCH/cxx11-lambdas.mm')
-rw-r--r--test/PCH/cxx11-lambdas.mm13
1 files changed, 11 insertions, 2 deletions
diff --git a/test/PCH/cxx11-lambdas.mm b/test/PCH/cxx11-lambdas.mm
index c00ec63..c455051 100644
--- a/test/PCH/cxx11-lambdas.mm
+++ b/test/PCH/cxx11-lambdas.mm
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -pedantic-errors -fblocks -std=c++11 -emit-pch %s -o %t-cxx11
-// RUN: %clang_cc1 -ast-print -pedantic-errors -fblocks -std=c++11 -include-pch %t-cxx11 %s | FileCheck -check-prefix=CHECK-PRINT %s
+// RUN: %clang_cc1 -pedantic-errors -fblocks -std=c++1y -emit-pch %s -o %t-cxx11
+// RUN: %clang_cc1 -ast-print -pedantic-errors -fblocks -std=c++1y -include-pch %t-cxx11 %s | FileCheck -check-prefix=CHECK-PRINT %s
#ifndef HEADER_INCLUDED
@@ -33,6 +33,11 @@ inline int to_block_pointer(int n) {
return block(17);
}
+template<typename T>
+int init_capture(T t) {
+ return [&, x(t)] { return sizeof(x); };
+}
+
#else
// CHECK-PRINT: T add_slowly
@@ -45,4 +50,8 @@ int add(int x, int y) {
// CHECK-PRINT: inline int add_int_slowly_twice
// CHECK-PRINT: lambda = [&] (int z)
+
+// CHECK-PRINT: init_capture
+// CHECK-PRINT: [&, x( t )]
+
#endif
OpenPOWER on IntegriCloud