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

    <tr>
        <th>Summary</th>
        <td>
            [clang++] Assertion trunk crashes at clang::Sema::ActOnPseudoDestructorExpr
        </td>
    </tr>

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

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

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

<pre>
    **This testcase is generated by a fuzzer.**

Compiler Explorer: [https://godbolt.org/z/5az9WTW3P](https://godbolt.org/z/5az9WTW3P)

This **invalid** code will crash on both Clang Trunk and Clang Assertion Trunk:
```cpp
template <typename... T>
requires( );
struct SS {
    void f( ) {
        (*p).~T...[]();
 }
};
```

Stack dump:
```
Unsupported type in pseudo destructor
UNREACHABLE executed at /root/llvm-project/clang/lib/Sema/SemaExprCXX.cpp:8458!
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-assertions-trunk/bin/clang++ -gdwarf-4 -g -o /app/output.s -mllvm --x86-asm-syntax=intel -fno-verbose-asm -S --gcc-toolchain=/opt/compiler-explorer/gcc-snapshot -fcolor-diagnostics -fno-crash-diagnostics -O3 <source>
1.      <source>:5:15: current parser token 'T'
2.      <source>:3:1: parsing struct/union/class body 'SS'
3.      <source>:4:15: parsing function body 'SS::f'
4.      <source>:4:15: in compound statement ('{}')
 #0 0x0000000003b99db8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3b99db8)
 #1 0x0000000003b97a7c llvm::sys::CleanupOnSignal(unsigned long) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3b97a7c)
 #2 0x0000000003ae6288 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
 #3 0x0000702de6442520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #4 0x0000702de64969fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
 #5 0x0000702de6442476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
 #6 0x0000702de64287f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
 #7 0x0000000003af1b5a (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3af1b5a)
 #8 0x0000000006d01861 clang::Sema::ActOnPseudoDestructorExpr(clang::Scope*, clang::Expr*, clang::SourceLocation, clang::tok::TokenKind, clang::SourceLocation, clang::DeclSpec const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6d01861)
 #9 0x00000000066a7ecb clang::Parser::ParseCXXPseudoDestructor(clang::Expr*, clang::SourceLocation, clang::tok::TokenKind, clang::CXXScopeSpec&, clang::OpaquePtr<clang::QualType>) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x66a7ecb)
#10 0x000000000669dc4e clang::Parser::ParsePostfixExpressionSuffix(clang::ActionResult<clang::Expr*, true>) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x669dc4e)
#11 0x0000000006696531 clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, bool&, clang::Parser::TypeCastState, bool, bool*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6696531)
#12 0x0000000006698687 clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, clang::Parser::TypeCastState, bool, bool*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6698687)
#13 0x0000000006698719 clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6698719)
#14 0x000000000669d139 clang::Parser::ParseExpression(clang::Parser::TypeCastState) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x669d139)
#15 0x000000000671fc19 clang::Parser::ParseExprStatement(clang::Parser::ParsedStmtContext) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x671fc19)
#16 0x0000000006715fec clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*, clang::ParsedAttributes&, clang::ParsedAttributes&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6715fec)
#17 0x0000000006716f00 clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6716f00)
#18 0x0000000006717dd5 clang::Parser::ParseCompoundStatementBody(bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6717dd5)
#19 0x000000000671952a clang::Parser::ParseFunctionStatementBody(clang::Decl*, clang::Parser::ParseScope&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x671952a)
#20 0x000000000663b060 clang::Parser::ParseLexedMethodDef(clang::Parser::LexedMethod&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x663b060)
#21 0x000000000663ad4d clang::Parser::ParseLexedMethodDefs(clang::Parser::ParsingClass&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x663ad4d)
#22 0x000000000668c4ce clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation, clang::SourceLocation, clang::ParsedAttributes&, unsigned int, clang::Decl*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x668c4ce)
#23 0x000000000668eaf3 clang::Parser::ParseClassSpecifier(clang::tok::TokenKind, clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext, clang::ParsedAttributes&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x668eaf3)
#24 0x00000000066632f0 clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&, clang::Parser::ParsedTemplateInfo&, clang::AccessSpecifier, clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*, clang::ImplicitTypenameContext) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x66632f0)
#25 0x00000000066200d4 clang::Parser::ParseDeclOrFunctionDefInternal(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec&, clang::AccessSpecifier) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x66200d4)
#26 0x0000000006620b3e clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*, clang::AccessSpecifier) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6620b3e)
#27 0x00000000066282d3 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x66282d3)
#28 0x00000000066291bd clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x66291bd)
#29 0x000000000661b6da clang::ParseAST(clang::Sema&, bool, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x661b6da)
#30 0x00000000044f0a28 clang::CodeGenAction::ExecuteAction() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x44f0a28)
#31 0x00000000047aa379 clang::FrontendAction::Execute() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x47aa379)
#32 0x0000000004728cbe clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4728cbe)
#33 0x000000000488fbfe clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x488fbfe)
#34 0x0000000000cd801f cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xcd801f)
#35 0x0000000000ccfd2a ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#36 0x00000000045346f9 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
#37 0x0000000003ae6734 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3ae6734)
#38 0x0000000004534cef 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
#39 0x00000000044fa62d clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x44fa62d)
#40 0x00000000044fb71d clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x44fb71d)
#41 0x0000000004503045 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4503045)
#42 0x0000000000cd4eef clang_main(int, char**, llvm::ToolContext const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xcd4eef)
#43 0x0000000000ba49a4 main (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xba49a4)
#44 0x0000702de6429d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#45 0x0000702de6429e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#46 0x0000000000ccf7de _start (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xccf7de)
clang++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
Compiler returned: 134
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzkW1Fzozjy_zTkRWUXCAz4IQ_Ejndn_7P_yY19t3lzCSFsbbDESiLjzMN99itJ2EbY8Uz2wtRU3dRuAkJS__rXre5GKEhKumGE3HqTO28yv0GN2nJx-0L_RCxKo8lNzouXWw9mHsxWWyqBIlJhJAmgEmwIIwIpUoD8BSBQNl-_EjG2nT1_7vntzxnf1bQiAtzv64oLIrwwA97kbqtULb0w8-DCg4sNL3JeqTEXGw8uvnpwMUFfp3-s_ggfvMncg-n3d4fTrniD26Ki7BlVtLA3APOCgC-0qgAWSG4BZyDnagtmFWIbsBINewKIFe19JiURinJmn2ggVkjs2_9wXdsWRXZ1hRQBXjhTLzVhaEfG4zFYeeG97SHIXw0VRHowBRpteGfbpRINVmC5BF7SNgEAwDOnBSjbzu4j_c-DqQez2oPT8b9X4_HY2tK0nqYGXjJvASfzY-sRfJewpUL4CRTNrj5X0t7-k8mmrrnQttcaAspALUlTcFAQqwQXbdf__3yfzX7N7j7eA7InuNFjkAIeXAjOlQcXVfW8G9WC_0mwvsWabd1Mcw8ulmSH2l_3-1rMHh_HmucwS6NJ6sHACnn4eJ8t74Fs8h1VAIG82QBBNECgOOg5DlXbJh9jvmtln0OgUjbaOAtjfspw1RQEqC1pHSVH-EkJhIkHZ6AWpBYcEylJASRvhG3WI5GUHFOzQkTDgMSC1mr8Ksn-2POnD4JvBNoBJDbNjjAlzWKBC14bctqlNCKHpdQSNkIH95QjZfwTLnLKTnzeefAOjDbFFyTKUQRGGzDiel5U13r2RtWNGksw2mkuwGi0T-MRkruRfGEK7b1wTpkiFRiVjI-eici5JPo5GC3BaLTBeKQ4r_AWUeaF86t4dWfJUC23XIFRiXnFxaigaMO4VBRLK8Mw7TZ_CvWKaik-LKVAk-Y0h9nEC7N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