diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-02-14 00:03:38 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-02-14 00:03:38 +0000 |
commit | d764437c9ce6feae11a9fca35bbc4ebc004f69e0 (patch) | |
tree | 2929aeee06b9a718b412e27133c794d99e3fb940 /test/CXX/expr/expr.prim/expr.prim.lambda | |
parent | d5387e86ce3dfe1ae09e050ee11d86ca0d066d04 (diff) |
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
Diffstat (limited to 'test/CXX/expr/expr.prim/expr.prim.lambda')
-rw-r--r-- | test/CXX/expr/expr.prim/expr.prim.lambda/p21.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
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] {}(); +} |