From: Douglas Gregor Date: Tue, 14 Feb 2012 00:03:38 +0000 (+0000) Subject: Simple test ensuring that we perform direct initialization when copy-capturing in... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d764437c9ce6feae11a9fca35bbc4ebc004f69e0;p=clang Simple test ensuring that we perform direct initialization when copy-capturing in lambdas git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150442 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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 index 0000000000..7139058cd0 --- /dev/null +++ b/test/CXX/expr/expr.prim/expr.prim.lambda/p21.cpp @@ -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] {}(); +}