[PATCH] D51142: [ASTImporter] Add test for PackExpansionExpr

Raphael Isemann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 22 16:35:10 PDT 2018


teemperor created this revision.
Herald added subscribers: cfe-commits, martong.
Herald added a reviewer: a.sidorin.

Repository:
  rC Clang

https://reviews.llvm.org/D51142

Files:
  test/Import/pack-expansion-expr/Inputs/F.cpp
  test/Import/pack-expansion-expr/test.cpp


Index: test/Import/pack-expansion-expr/test.cpp
===================================================================
--- /dev/null
+++ test/Import/pack-expansion-expr/test.cpp
@@ -0,0 +1,12 @@
+// RUN: clang-import-test -dump-ast -import %S/Inputs/F.cpp -expression %s | FileCheck %s
+
+// CHECK: PackExpansionExpr
+// CHECK-SAME: '<dependent type>'
+// CHECK-NEXT: DeclRefExpr
+// CHECK-SAME: 'T...'
+// CHECK-SAME: ParmVar
+// CHECK-SAME: 'a'
+
+void expr() {
+  f();
+}
Index: test/Import/pack-expansion-expr/Inputs/F.cpp
===================================================================
--- /dev/null
+++ test/Import/pack-expansion-expr/Inputs/F.cpp
@@ -0,0 +1,11 @@
+template <typename... T>
+void sink(T... a);
+
+template <typename... T>
+void packfuncT(T... a) {
+  sink(a...);
+}
+
+void f() {
+  packfuncT(1, 2, 3);
+}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51142.162104.patch
Type: text/x-patch
Size: 830 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180822/f20ae85f/attachment.bin>


More information about the cfe-commits mailing list