From: Richard Smith Date: Sat, 28 Sep 2013 05:23:21 +0000 (+0000) Subject: Add extra testing for init-captures. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1851715dd6e2111e4c503f473f7bd4917df0ff7b;p=clang Add extra testing for init-captures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191608 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/SemaCXX/cxx1y-init-captures.cpp b/test/SemaCXX/cxx1y-init-captures.cpp new file mode 100644 index 0000000000..d737a4ae62 --- /dev/null +++ b/test/SemaCXX/cxx1y-init-captures.cpp @@ -0,0 +1,14 @@ +// RUN: %clang_cc1 -std=c++1y %s -verify + +// expected-no-diagnostics +namespace variadic_expansion { + void f(int &, char &); + + template void g(T &... t) { + f([&a(t)]()->decltype(auto) { + return a; + }() ...); + } + + void h(int i, char c) { g(i, c); } +}