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

    <tr>
        <th>Summary</th>
        <td>
            clang-tidy 19.1.0-rc2 ICE on make_shared<Deriv>(Base { ... })
        </td>
    </tr>

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

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

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

<pre>
    Small repro test case:

```
#include <memory>

struct Base { int x; };
struct Deriv : Base { };

void test() {
  auto deriv = std::make_shared<Deriv>(Base { 0 });
}
```

```
$ clang-tidy --extra-arg=-std=c++20 test.cc
Running without flags.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.      Program arguments: /nix/store/3lgyb01a6qb86xrr0mdad53iih80nbgh-clang-tools-19.1.0-rc2/bin/clang-tidy --extra-arg=-std=c++20 test.cc
1.      <eof> parser at end of file
2. While analyzing stack:
        #0 Calling std::_Construct(struct Deriv *, struct Base &&) at line /nix/store/wl7xs26116sswgw18pnc3yw9r5gxr6hx-gcc-13.3.0/include/c++/13.3.0/bits/alloc_traits.h:661:4
 #1 Calling std::allocator_traits<std::allocator<void>>::construct(allocator_type &, struct Deriv *, struct Base &&) at line /nix/store/wl7xs26116sswgw18pnc3yw9r5gxr6hx-gcc-13.3.0/include/c++/13.3.0/bits/shared_ptr_base.h:604:4
 #2 Calling std::_Sp_counted_ptr_inplace<Deriv, std::allocator<void>, __gnu_cxx::_S_atomic>::_Sp_counted_ptr_inplace(class std::allocator<void>, struct Base &&) at line /nix/store/wl7xs26116sswgw18pnc3yw9r5gxr6hx-gcc-13.3.0/include/c++/13.3.0/bits/shared_ptr_base.h:972:6
 #3 Calling std::__shared_count<>::__shared_count(struct Deriv *&, _Sp_alloc_shared_tag<allocator<void> >, struct Base &&) at line /nix/store/wl7xs26116sswgw18pnc3yw9r5gxr6hx-gcc-13.3.0/include/c++/13.3.0/bits/shared_ptr_base.h:1712:14
 #4 Calling std::__shared_ptr<Deriv>::__shared_ptr(_Sp_alloc_shared_tag<allocator<void> >, struct Base &&) at line /nix/store/wl7xs26116sswgw18pnc3yw9r5gxr6hx-gcc-13.3.0/include/c++/13.3.0/bits/shared_ptr.h:464:4
 #5 Calling std::shared_ptr<Deriv>::shared_ptr(_Sp_alloc_shared_tag<allocator<void> >, struct Base &&) at line /nix/store/wl7xs26116sswgw18pnc3yw9r5gxr6hx-gcc-13.3.0/include/c++/13.3.0/bits/shared_ptr.h:1009:14
 #6 Calling std::make_shared(struct Base &&) at line 7
        #7 Calling test()
3. /nix/store/wl7xs26116sswgw18pnc3yw9r5gxr6hx-gcc-13.3.0/include/c++/13.3.0/bits/stl_construct.h:119:29: Error evaluating statement
4. /nix/store/wl7xs26116sswgw18pnc3yw9r5gxr6hx-gcc-13.3.0/include/c++/13.3.0/bits/stl_construct.h:119:29: Error evaluating statement
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0  libLLVM.so.19.1-rc2 0x00007fffeb5e45be llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 62
1  libLLVM.so.19.1-rc2      0x00007fffeb5e1a4b
2  libc.so.6 0x00007fffea0495c0
3  libclang-cpp.so.19.1-rc2 0x00007ffff45f3d5c
4  libclang-cpp.so.19.1-rc2 0x00007ffff460dce6 clang::ASTContext::getUnresolvedUsingType(clang::UnresolvedUsingTypenameDecl const*) const + 198
5  libclang-cpp.so.19.1-rc2 0x00007ffff47de400
6 libclang-cpp.so.19.1-rc2 0x00007ffff47e0ac7 clang::CXXMethodDecl::getThisType(clang::FunctionProtoType const*, clang::CXXRecordDecl const*) + 39
7  libclang-cpp.so.19.1-rc2 0x00007ffff6ceca04 clang::ento::SValBuilder::getCXXThis(clang::CXXMethodDecl const*, clang::StackFrameContext const*) + 20
8  libclang-cpp.so.19.1-rc2 0x00007ffff6c35499 clang::ento::ExprEngine::handleConstructor(clang::Expr const*, clang::ento::ExplodedNode*, clang::ento::ExplodedNodeSet&) + 489
9 libclang-cpp.so.19.1-rc2 0x00007ffff6c0d46b clang::ento::ExprEngine::Visit(clang::Stmt const*, clang::ento::ExplodedNode*, clang::ento::ExplodedNodeSet&) + 2379
10 libclang-cpp.so.19.1-rc2 0x00007ffff6c0f5bd clang::ento::ExprEngine::ProcessStmt(clang::Stmt const*, clang::ento::ExplodedNode*) + 541
11 libclang-cpp.so.19.1-rc2 0x00007ffff6c1cc72 clang::ento::ExprEngine::processCFGElement(clang::CFGElement, clang::ento::ExplodedNode*, unsigned int, clang::ento::NodeBuilderContext*) + 194
12 libclang-cpp.so.19.1-rc2 0x00007ffff6bc8c52 clang::ento::CoreEngine::dispatchWorkItem(clang::ento::ExplodedNode*, clang::ProgramPoint, clang::ento::WorkListUnit const&) + 402
13 libclang-cpp.so.19.1-rc2 0x00007ffff6bc8eb6 clang::ento::CoreEngine::ExecuteWorkList(clang::LocationContext const*, unsigned int, llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>) + 246
14 libclang-cpp.so.19.1-rc2 0x00007ffff7116bf2
15 libclang-cpp.so.19.1-rc2 0x00007ffff712a763
16 libclang-cpp.so.19.1-rc2 0x00007ffff68dc268 clang::MultiplexConsumer::HandleTranslationUnit(clang::ASTContext&) + 40
17 libclang-cpp.so.19.1-rc2 0x00007ffff44b53dc clang::ParseAST(clang::Sema&, bool, bool) + 1212
18 libclang-cpp.so.19.1-rc2 0x00007ffff689d0d9 clang::FrontendAction::Execute() + 201
19 libclang-cpp.so.19.1-rc2 0x00007ffff68191bb clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 1451
20 libclang-cpp.so.19.1-rc2 0x00007ffff6ab6909 clang::tooling::FrontendActionFactory::runInvocation(std::shared_ptr<clang::CompilerInvocation>, clang::FileManager*, std::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticConsumer*) + 361
21 clang-tidy 0x0000000000e9ec77
22 libclang-cpp.so.19.1-rc2 0x00007ffff6ab0176 clang::tooling::ToolInvocation::runInvocation(char const*, clang::driver::Compilation*, std::shared_ptr<clang::CompilerInvocation>, std::shared_ptr<clang::PCHContainerOperations>) + 118
23 libclang-cpp.so.19.1-rc2 0x00007ffff6ab1c4e clang::tooling::ToolInvocation::run() + 1278
24 libclang-cpp.so.19.1-rc2 0x00007ffff6ab3ecb clang::tooling::ClangTool::run(clang::tooling::ToolAction*) + 3195
25 clang-tidy               0x0000000000e9ff78 clang::tidy::runClangTidy(clang::tidy::ClangTidyContext&, clang::tooling::CompilationDatabase const&, llvm::ArrayRef<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, llvm::IntrusiveRefCntPtr<llvm::vfs::OverlayFileSystem>, bool, bool, llvm::StringRef) + 984
26 clang-tidy               0x00000000005e6b14 clang::tidy::clangTidyMain(int, char const**) + 3300
27 libc.so.6 0x00007fffea03314e
28 libc.so.6                0x00007fffea033209 __libc_start_main + 137
29 clang-tidy               0x00000000005df555 _start + 37
Segmentation fault (core dumped)
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzcWV-P4jj2_TSuF6tQYufvAw9UKH7TUtdvSk3NTO--IMcxwdvBZm2Hgvn0KydOSBrozs6uRj2LUBXga_uc4-t7rx2iNS8FY3MQPoFw-UBqs5NqXrBKSbN7yGVxnq_3pKqgYgcloWHaQEo0A3gBvCXwur-R597tV4S5oFVdMAhwtmd7qc4APw97aKNqauAT0QyC-AlyYeAJ4CcI4iXATyOjJVP8CAFeXMyHVu3fo-RFgw-gBKDUWrUNEJLaSFi4QZZQm8LCx4s9-cI2ekcUKwDOmlksSpT003jNRCi9zBUvbzO-LUMAaUVE-Wh4cYaPj-xkFHkkqgR4-djAWFKAngB6Ql6DfUZp2_VTLQQXJXznZidrA7cVKfWsbXv9-LxYP0Nd53tuIIF5XdrlkcpAI-HOmIO2_N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