]> granicus.if.org Git - clang/commitdiff
Simple test ensuring that we perform direct initialization when copy-capturing in...
authorDouglas Gregor <dgregor@apple.com>
Tue, 14 Feb 2012 00:03:38 +0000 (00:03 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 14 Feb 2012 00:03:38 +0000 (00:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150442 91177308-0d34-0410-b5e6-96231b3b80d8

test/CXX/expr/expr.prim/expr.prim.lambda/p21.cpp [new file with mode: 0644]

diff --git a/test/CXX/expr/expr.prim/expr.prim.lambda/p21.cpp b/test/CXX/expr/expr.prim/expr.prim.lambda/p21.cpp
new file mode 100644 (file)
index 0000000..7139058
--- /dev/null
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -fsyntax-only -std=c++11 %s -verify
+
+struct DirectInitOnly {
+  explicit DirectInitOnly(DirectInitOnly&);
+};
+
+void direct_init_capture(DirectInitOnly &dio) {
+  [dio] {}();
+}