<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/93650>93650</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Clang errors out after parsing out a typeid of and indexed parameter pack.
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          AhmedLilah
      </td>
    </tr>
</table>

<pre>
    Version: x86-64Trunk
Platform: www.godblot.org

Source 
```cpp
#include <print>

auto function(auto ... inputArgs) {
    return typeid(inputArgs...[0]).name();
}


auto main() -> int {
 std::println("{}", function(5, 5.0, "char", 'c'));
    return 0;
}
```


Crash backtrace
```plain
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: /opt/compiler-explorer/clang-trunk/bin/clang++ -gdwarf-4 -g -o /app/output.s -mllvm --x86-asm-syntax=intel -S --gcc-toolchain=/opt/compiler-explorer/gcc-snapshot -fcolor-diagnostics -fno-crash-diagnostics -std=c++26 -stdlib=libc++ -O3 <source>
1.      <source>:4:35: current parser token '.'
2.      <source>:3:35: parsing function body 'function'
3.      <source>:3:35: in compound statement ('{}')
 #0 0x0000000003742eb8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3742eb8)
 #1 0x0000000003741004 llvm::sys::CleanupOnSignal(unsigned long) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3741004)
 #2 0x000000000368caf8 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
 #3 0x00007098b0442520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #4 0x00000000070ecb10 clang::Expr::HasSideEffects(clang::ASTContext const&, bool) const (/opt/compiler-explorer/clang-trunk/bin/clang+++0x70ecb10)
 #5 0x0000000006575ffb clang::Sema::BuildCXXTypeId(clang::QualType, clang::SourceLocation, clang::Expr*, clang::SourceLocation) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x6575ffb)
 #6 0x000000000659f984 clang::Sema::ActOnCXXTypeid(clang::SourceLocation, clang::SourceLocation, bool, void*, clang::SourceLocation) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x659f984)
 #7 0x0000000005f53aff clang::Parser::ParseCXXTypeid() (/opt/compiler-explorer/clang-trunk/bin/clang+++0x5f53aff)
 #8 0x0000000005f418e1 clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, bool&, clang::Parser::TypeCastState, bool, bool*) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x5f418e1)
 #9 0x0000000005f4424a clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, clang::Parser::TypeCastState, bool, bool*) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x5f4424a)
#10 0x0000000005f44409 clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x5f44409)
#11 0x0000000005f49789 clang::Parser::ParseExpression(clang::Parser::TypeCastState) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x5f49789)
#12 0x0000000005fc4d4d clang::Parser::ParseReturnStatement() (/opt/compiler-explorer/clang-trunk/bin/clang+++0x5fc4d4d)
#13 0x0000000005fc902e clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*, clang::ParsedAttributes&, clang::ParsedAttributes&) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x5fc902e)
#14 0x0000000005fca377 clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x5fca377)
#15 0x0000000005fcb1b1 clang::Parser::ParseCompoundStatementBody(bool) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x5fcb1b1)
#16 0x0000000005fcd71a clang::Parser::ParseFunctionStatementBody(clang::Decl*, clang::Parser::ParseScope&) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x5fcd71a)
#17 0x0000000005ecabbb clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&, clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x5ecabbb)
#18 0x0000000005f1221e clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, clang::DeclaratorContext, clang::ParsedAttributes&, clang::Parser::ParsedTemplateInfo&, clang::SourceLocation*, clang::Parser::ForRangeInit*) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x5f1221e)
#19 0x0000000005ec4be7 clang::Parser::ParseDeclOrFunctionDefInternal(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec&, clang::AccessSpecifier) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x5ec4be7)
#20 0x0000000005ec5ad3 clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*, clang::AccessSpecifier) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x5ec5ad3)
#21 0x0000000005ece15a clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x5ece15a)
#22 0x0000000005ecff47 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x5ecff47)
#23 0x0000000005ebf09a clang::ParseAST(clang::Sema&, bool, bool) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x5ebf09a)
#24 0x0000000003fc577d clang::CodeGenAction::ExecuteAction() (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3fc577d)
#25 0x0000000004267c31 clang::FrontendAction::Execute() (/opt/compiler-explorer/clang-trunk/bin/clang+++0x4267c31)
#26 0x00000000041eb1cb clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x41eb1cb)
#27 0x000000000434e9d3 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x434e9d3)
#28 0x0000000000c5bd9c cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/compiler-explorer/clang-trunk/bin/clang+++0xc5bd9c)
#29 0x0000000000c55c8d ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#30 0x000000000400ea89 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const::'lambda'()>(long) Job.cpp:0:0
#31 0x000000000368cf13 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x368cf13)
#32 0x000000000400eca9 clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (.part.0) Job.cpp:0:0
#33 0x0000000003fd4925 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3fd4925)
#34 0x0000000003fd52fd clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3fd52fd)
#35 0x0000000003fdf21c clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3fdf21c)
#36 0x0000000000c59191 clang_main(int, char**, llvm::ToolContext const&) (/opt/compiler-explorer/clang-trunk/bin/clang+++0xc59191)
#37 0x0000000000b3a8a4 main (/opt/compiler-explorer/clang-trunk/bin/clang+++0xb3a8a4)
#38 0x00007098b0429d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#39 0x00007098b0429e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#40 0x0000000000c5572e _start (/opt/compiler-explorer/clang-trunk/bin/clang+++0xc5572e)
clang++: error: clang frontend command failed with exit code 139 (use -v to see invocation)
Compiler returned: 139
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzkWlFzozjW_TXkRQUFAgw8-IHYyUzm66_S205NzZtLCGFrAxIricT591sS2EHEdmdm6Z6t2qmZCRZX0jlHV1dXEkhKumOELJ341onXN6hTey6W-b4h5Rdao_1Nwcu35e9ESMqZE-bgkC7cRfQkOvbs-GvHz7_WSFVcNPrl6-urt-NlUXPlcbHrDfr_b3gnMAFD0cLv_8VtO5TAkDJcdyUBTrhqBWXKCe_GDaBOcVB1DCuNBKbmt-d5gLK2U7nYSQdmwElue3MAABBEdYIB9dYSWjowPVl6nufEt74Trx2YeQw1xIGpAzMnHGo7yXrc9whBgyjrjYHrhHeAMjXqVKrSCXMnzA2DureE-n2y1g9wNaYQ69-x5-s_DoR4j8Rg5MAEOzDRkEaoRpz8M1CPon5EvhJI7kGB8LMSCJOJfVtrTv1gfrnLN3dAdkVDFUCg6HZAkJYLBRQHe6VaqfnBewfe76jad4WHeePA-7p-Of5xW8H_SbBy4D2VsiPSgfcAsRIcB1jtCcATRHAFWkFawTGRkpRAGnfRxbomkpJjihQpgegYkFjQVnmDYymEn0HZNa1GZop8z_Gzr4LvBGoAEruuIUxp4MCB97zVyDBvWloT4ZJDW3NBhC6rEdu5yrg2vC_0OPdlDrx14C1wd-UrEpUbAXcHXK4bQ22rm-xU2ylPArfRA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