[clang] Add a test for #100095 (PR #100556)

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 25 04:05:23 PDT 2024


https://github.com/alexfh created https://github.com/llvm/llvm-project/pull/100556

The test is set to XFAIL with assertions enabled.


>From 09cf032759b43e8a30720be9ef2f9caf13bcb0cb Mon Sep 17 00:00:00 2001
From: Alexander Kornienko <alexfh at google.com>
Date: Thu, 25 Jul 2024 13:02:38 +0200
Subject: [PATCH] Add a test for #100095

The test is set to XFAIL with assertions enabled.
---
 clang/test/SemaCXX/pr100095.cpp | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 clang/test/SemaCXX/pr100095.cpp

diff --git a/clang/test/SemaCXX/pr100095.cpp b/clang/test/SemaCXX/pr100095.cpp
new file mode 100644
index 0000000000000..15913fec9d5ae
--- /dev/null
+++ b/clang/test/SemaCXX/pr100095.cpp
@@ -0,0 +1,17 @@
+// RUN: %clang_cc1 -fsyntax-only -std=c++11 %s
+// XFAIL: asserts
+
+template <class> struct Pair;
+template <class...> struct Tuple {
+  template <class _Up> Tuple(_Up);
+};
+template <typename> struct StatusOr;
+template <int> using ElementType = int;
+template <int... fields>
+using Key = Tuple<ElementType<fields>...>;
+template <int... fields>
+StatusOr<Pair<Key<fields...>>> Parser();
+struct Helper { Helper(Tuple<>, Tuple<>, int, int); };
+struct D : Helper {
+  D(Key<> f, int n, int e) : Helper(f, Parser<>, n, e) {}
+};



More information about the cfe-commits mailing list