diff options
author | Chris Mihelich <cmihelic@google.com> | 2024-06-04 16:06:31 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2024-06-04 16:07:33 -0700 |
commit | 8777d4408904ae184593014e71ff8fc0bb3bdecd (patch) | |
tree | b4fc60bfdea6a1b1192d6a3696e3d85307633cfd /absl/debugging/internal/demangle_test.cc | |
parent | d8e17c009185a3bb305d774aa9e41f3c5de605f6 (diff) |
Demangle sizeof...(pack captured from an alias template), sP ... E.
PiperOrigin-RevId: 640314320
Change-Id: I1020879b354c75558d3dba064bb3ea13bd667227
Diffstat (limited to 'absl/debugging/internal/demangle_test.cc')
-rw-r--r-- | absl/debugging/internal/demangle_test.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/absl/debugging/internal/demangle_test.cc b/absl/debugging/internal/demangle_test.cc index cb8b36d0..052c66bb 100644 --- a/absl/debugging/internal/demangle_test.cc +++ b/absl/debugging/internal/demangle_test.cc @@ -812,6 +812,22 @@ TEST(Demangle, SizeofPacks) { EXPECT_STREQ("g<>()", tmp); } +TEST(Demangle, SizeofPackInvolvingAnAliasTemplate) { + char tmp[80]; + + // Source: + // + // template <class... T> using A = char[sizeof...(T)]; + // template <class... U> void f(const A<U..., int>&) {} + // template void f<int>(const A<int, int>&); + // + // Full LLVM demangling of the instantiation of f: + // + // void f<int>(char const (&) [sizeof... (int, int)]) + EXPECT_TRUE(Demangle("_Z1fIJiEEvRAsPDpT_iE_Kc", tmp, sizeof(tmp))); + EXPECT_STREQ("f<>()", tmp); +} + TEST(Demangle, Spaceship) { char tmp[80]; |