r191608 - Add extra testing for init-captures.
Richard Smith
richard-llvm at metafoo.co.uk
Fri Sep 27 22:23:21 PDT 2013
Author: rsmith
Date: Sat Sep 28 00:23:21 2013
New Revision: 191608
URL: http://llvm.org/viewvc/llvm-project?rev=191608&view=rev
Log:
Add extra testing for init-captures.
Added:
cfe/trunk/test/SemaCXX/cxx1y-init-captures.cpp
Added: cfe/trunk/test/SemaCXX/cxx1y-init-captures.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/cxx1y-init-captures.cpp?rev=191608&view=auto
==============================================================================
--- cfe/trunk/test/SemaCXX/cxx1y-init-captures.cpp (added)
+++ cfe/trunk/test/SemaCXX/cxx1y-init-captures.cpp Sat Sep 28 00:23:21 2013
@@ -0,0 +1,14 @@
+// RUN: %clang_cc1 -std=c++1y %s -verify
+
+// expected-no-diagnostics
+namespace variadic_expansion {
+ void f(int &, char &);
+
+ template <typename ... T> void g(T &... t) {
+ f([&a(t)]()->decltype(auto) {
+ return a;
+ }() ...);
+ }
+
+ void h(int i, char c) { g(i, c); }
+}
More information about the cfe-commits
mailing list