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

    <tr>
        <th>Summary</th>
        <td>
            [analyzer] Assertion `(S.getLangOpts().CPlusPlus11 || CCE == CCEKind::TempArgStrict) && "converted constant expression outside C++11 or TTP matching"' failed
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang:static analyzer,
            crash
      </td>
    </tr>

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

    <tr>
      <th>Reporter</th>
      <td>
          k-arrows
      </td>
    </tr>
</table>

<pre>
    Reproducer:
https://godbolt.org/z/7rTfGo6ze
```cpp
struct S {
  explicit(true) S(int);
};
```

Backtrace:
```console
clang++: /root/llvm-project/llvm/tools/clang/lib/Sema/SemaOverload.cpp:6271: clang::ExprResult BuildConvertedConstantExpression(clang::Sema&, clang::Expr*, clang::QualType, clang::CCEKind, clang::NamedDecl*, clang::APValue&): Assertion `(S.getLangOpts().CPlusPlus11 || CCE == CCEKind::TempArgStrict) && "converted constant expression outside C++11 or TTP matching"' failed.
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 --analyze --std=c++03 <source>
1.      <source>:2:18: current parser token 'S'
2.      <source>:1:1: parsing struct/union/class body 'S'
 #0 0x0000000003ff2ff8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3ff2ff8)
 #1 0x0000000003ff0424 llvm::sys::CleanupOnSignal(unsigned long) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3ff0424)
 #2 0x0000000003f34d18 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
 #3 0x00007ff955842520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #4 0x00007ff9558969fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
 #5 0x00007ff955842476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
 #6 0x00007ff9558287f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
 #7 0x00007ff95582871b (/lib/x86_64-linux-gnu/libc.so.6+0x2871b)
 #8 0x00007ff955839e96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
 #9 0x0000000006f934af BuildConvertedConstantExpression(clang::Sema&, clang::Expr*, clang::QualType, clang::CCEKind, clang::NamedDecl*, clang::APValue&) SemaOverload.cpp:0:0
#10 0x0000000006f9369a clang::Sema::CheckConvertedConstantExpression(clang::Expr*, clang::QualType, llvm::APSInt&, clang::CCEKind) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6f9369a)
#11 0x0000000006adddb8 clang::Sema::tryResolveExplicitSpecifier(clang::ExplicitSpecifier&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6adddb8)
#12 0x0000000006addeca clang::Sema::ActOnExplicitBoolSpecifier(clang::Expr*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6addeca)
#13 0x00000000066f0c09 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+++0x66f0c09)
#14 0x0000000006713ff6 clang::Parser::ParseCXXClassMemberDeclaration(clang::AccessSpecifier, clang::ParsedAttributes&, clang::Parser::ParsedTemplateInfo&, clang::ParsingDeclRAIIObject*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6713ff6)
#15 0x00000000067164bf clang::Parser::ParseCXXClassMemberDeclarationWithPragmas(clang::AccessSpecifier&, clang::ParsedAttributes&, clang::TypeSpecifierType, clang::Decl*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x67164bf)
#16 0x00000000067182d7 clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation, clang::SourceLocation, clang::ParsedAttributes&, unsigned int, clang::Decl*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x67182d7)
#17 0x000000000671b200 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+++0x671b200)
#18 0x00000000066ee9ce 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+++0x66ee9ce)
#19 0x00000000066a9ad8 clang::Parser::ParseDeclOrFunctionDefInternal(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec&, clang::AccessSpecifier) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x66a9ad8)
#20 0x00000000066aa4ff clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*, clang::AccessSpecifier) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x66aa4ff)
#21 0x00000000066b220a clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x66b220a)
#22 0x00000000066b3195 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x66b3195)
#23 0x00000000066b3650 clang::Parser::ParseFirstTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x66b3650)
#24 0x00000000066a4eb3 clang::ParseAST(clang::Sema&, bool, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x66a4eb3)
#25 0x0000000004c8ebd5 clang::FrontendAction::Execute() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4c8ebd5)
#26 0x0000000004c0aeae clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4c0aeae)
#27 0x0000000004d83d01 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4d83d01)
#28 0x0000000000dae39f cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xdae39f)
#29 0x0000000000da500a ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#30 0x0000000004a01d39 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 0x0000000003f351b4 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3f351b4)
#32 0x0000000004a0234f 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 0x00000000049c458d clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x49c458d)
#34 0x00000000049c561e 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+++0x49c561e)
#35 0x00000000049cd065 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x49cd065)
#36 0x0000000000daa835 clang_main(int, char**, llvm::ToolContext const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xdaa835)
#37 0x0000000000c5ece4 main (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xc5ece4)
#38 0x00007ff955829d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#39 0x00007ff955829e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#40 0x0000000000da4ab5 _start (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xda4ab5)
clang++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
Compiler returned: 134
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzsmt9zozjywP8a5UWFC8QPw0MeGBLvN_udveTi1N6-uYQQti6AOElknP3rryRhY7DjTHbjqdq7m5pUCJJa3Z9utRoElpKtG0qvQfgFhDdXuFMbLq6fHSwE_yavcl68Xj_SVvCiI1QAPwVuulGqlfoSLQBarHmR80rNuFgDtPgdoMVcPJU_8eh3CtwURK79T9oWuKlUoiMKLiGYfwFuCiHdthUjTAEUK9FRgBK4BChmjQIoAb7uBOY3_cVOlr520y-YPCuBCbVaDTPxRvJKT04q3KwB-qL_-ykEaCE4VwAtquqldlrB_0nJ7k-AForzSgK06IctKpYDtFjSGve_7l-oqDguZtoYP43Q3NNybX8_BX56u23FI5VdpeCXjlVFxpsXKhTVF1LhRukOVErGG4Dig4F2lgigbCoOoH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