aboutsummaryrefslogtreecommitdiff
path: root/clang/test/SemaCXX/cxx2c-pack-indexing.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaCXX/cxx2c-pack-indexing.cpp')
-rw-r--r--clang/test/SemaCXX/cxx2c-pack-indexing.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/cxx2c-pack-indexing.cpp b/clang/test/SemaCXX/cxx2c-pack-indexing.cpp
index cb679a6..58b642d 100644
--- a/clang/test/SemaCXX/cxx2c-pack-indexing.cpp
+++ b/clang/test/SemaCXX/cxx2c-pack-indexing.cpp
@@ -305,3 +305,19 @@ template <class... Args> struct mdispatch_ {
mdispatch_<int, int> d;
} // namespace GH116105
+
+namespace GH121242 {
+ // Non-dependent type pack access
+ template <int...x>
+ int y = x...[0];
+
+ struct X {};
+
+ template <X...x>
+ X z = x...[0];
+
+ void foo() {
+ (void)y<0>;
+ (void)z<X{}>;
+ }
+} // namespace GH121242