[clang] [clang] fix parsing typeid with pack index (PR #94299)
Younan Zhang via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 3 19:15:27 PDT 2024
================
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -std=c++2c -fsyntax-only -verify %s
+// expected-no-diagnostics
+
+namespace std {
+struct type_info {
+ const char *name;
+};
+} // namespace std
+
+namespace GH93650_bug {
+auto func(auto... inputArgs) { return typeid(inputArgs...[0]); }
+} // namespace GH93650_bug
----------------
zyn0217 wrote:
nit: Can you move this test to `clang/test/SemaCXX/cxx2c-pack-indexing.cpp` with a new namespace `GH93650`? I prefer avoiding scattering tests everywhere so that someone can just rerun the single test quickly when the implementation is altered in future.
https://github.com/llvm/llvm-project/pull/94299
More information about the cfe-commits
mailing list