[cfe-commits] r150442 - /cfe/trunk/test/CXX/expr/expr.prim/expr.prim.lambda/p21.cpp

Douglas Gregor dgregor at apple.com
Mon Feb 13 16:03:38 PST 2012


Author: dgregor
Date: Mon Feb 13 18:03:38 2012
New Revision: 150442

URL: http://llvm.org/viewvc/llvm-project?rev=150442&view=rev
Log:
Simple test ensuring that we perform direct initialization when copy-capturing in lambdas

Added:
    cfe/trunk/test/CXX/expr/expr.prim/expr.prim.lambda/p21.cpp

Added: cfe/trunk/test/CXX/expr/expr.prim/expr.prim.lambda/p21.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/expr/expr.prim/expr.prim.lambda/p21.cpp?rev=150442&view=auto
==============================================================================
--- cfe/trunk/test/CXX/expr/expr.prim/expr.prim.lambda/p21.cpp (added)
+++ cfe/trunk/test/CXX/expr/expr.prim/expr.prim.lambda/p21.cpp Mon Feb 13 18:03:38 2012
@@ -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] {}();
+}





More information about the cfe-commits mailing list