]> granicus.if.org Git - clang/commitdiff
Add extra testing for init-captures.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Sat, 28 Sep 2013 05:23:21 +0000 (05:23 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Sat, 28 Sep 2013 05:23:21 +0000 (05:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191608 91177308-0d34-0410-b5e6-96231b3b80d8

test/SemaCXX/cxx1y-init-captures.cpp [new file with mode: 0644]

diff --git a/test/SemaCXX/cxx1y-init-captures.cpp b/test/SemaCXX/cxx1y-init-captures.cpp
new file mode 100644 (file)
index 0000000..d737a4a
--- /dev/null
@@ -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); }
+}