<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/111450>111450</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-tidy] Segfault with performance-move-const-arg
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-tidy
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
layus
</td>
</tr>
</table>
<pre>
```
$ gh repo clone rerun-io/rerun
$ clang-tidy --checks=performance-move-const-arg rerun/rerun_cpp/src/rerun/result.hpp
Error while trying to load a compilation database:
Could not auto-detect compilation database for file "rerun/rerun_cpp/src/rerun/result.hpp"
No compilation database found in /home/layus/downloads/tmp/rerun/rerun_cpp/src/rerun or any parent directory
fixed-compilation-database: Error while opening fixed database: No such file or directory
json-compilation-database: Error while opening JSON database: No such file or directory
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/wrk88d1gim99faj1w0avvxx6d4hrzdcx-clang-tools-17.0.6/bin/clang-tidy --checks=performance-move-const-arg rerun/rerun_cpp/src/rerun/result.hpp
1. <eof> parser at end of file
2. ASTMatcher: Processing 'performance-move-const-arg' against:
CXXConstructExpr : </home/layus/downloads/tmp/rerun/rerun_cpp/src/rerun/result.hpp:34:51, col:74>
--- Bound Nodes Begin ---
call-move - { CallExpr : </home/layus/downloads/tmp/rerun/rerun_cpp/src/rerun/result.hpp:34:57, col:73> }
invocation-parm - { ParmVarDecl status : </home/layus/downloads/tmp/rerun/rerun_cpp/src/rerun/error.hpp:113:15, col:36> }
invocation-parm-type - { QualType : const arrow::Status & }
receiving-expr - { CXXConstructExpr : </home/layus/downloads/tmp/rerun/rerun_cpp/src/rerun/result.hpp:34:51, col:74> }
--- Bound Nodes End ---
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-17.so 0x00007f904c20d90e llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 62
1 libLLVM-17.so 0x00007f904c20affb
2 libc.so.6 0x00007f904ae495c0
3 clang-tidy 0x0000000000d202f2 clang::tidy::performance::MoveConstArgCheck::check(clang::ast_matchers::MatchFinder::MatchResult const&) + 3426
4 clang-tidy 0x0000000000f0cb33
5 clang-tidy 0x0000000000f39b01 clang::ast_matchers::internal::BoundNodesTreeBuilder::visitMatches(clang::ast_matchers::internal::BoundNodesTreeBuilder::Visitor*) + 225
6 clang-tidy 0x0000000000f0ecae
7 clang-tidy 0x0000000000f2c93e
8 clang-tidy 0x0000000000f2fd67
9 clang-tidy 0x0000000000f34273
10 clang-tidy 0x0000000000f26d03
11 clang-tidy 0x0000000000f27412
12 clang-tidy 0x0000000000f26307
13 clang-tidy 0x0000000000f33ded
14 clang-tidy 0x0000000000f26143
15 clang-tidy 0x0000000000f27412
16 clang-tidy 0x0000000000f329c0
17 clang-tidy 0x0000000000f25f23
18 clang-tidy 0x0000000000f27412
19 clang-tidy 0x0000000000f345b8
20 clang-tidy 0x0000000000f25435
21 clang-tidy 0x0000000000f27a60 clang::ast_matchers::MatchFinder::matchAST(clang::ASTContext&) + 576
22 libclang-cpp.so.17 0x00007f9056a95998 clang::MultiplexConsumer::HandleTranslationUnit(clang::ASTContext&) + 40
23 libclang-cpp.so.17 0x00007f9054abcd09 clang::ParseAST(clang::Sema&, bool, bool) + 1177
24 libclang-cpp.so.17 0x00007f9056a5a269 clang::FrontendAction::Execute() + 201
25 libclang-cpp.so.17 0x00007f90569dbd29 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 281
26 libclang-cpp.so.17 0x00007f9056cb1879 clang::tooling::FrontendActionFactory::runInvocation(std::shared_ptr<clang::CompilerInvocation>, clang::FileManager*, std::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticConsumer*) + 361
27 clang-tidy 0x00000000015f1367
28 libclang-cpp.so.17 0x00007f9056cab396 clang::tooling::ToolInvocation::runInvocation(char const*, clang::driver::Compilation*, std::shared_ptr<clang::CompilerInvocation>, std::shared_ptr<clang::PCHContainerOperations>) + 118
29 libclang-cpp.so.17 0x00007f9056cad2be clang::tooling::ToolInvocation::run() + 1214
30 libclang-cpp.so.17 0x00007f9056cafcd3 clang::tooling::ClangTool::run(clang::tooling::ToolAction*) + 3091
31 clang-tidy 0x00000000015fb1f7 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) + 951
32 clang-tidy 0x0000000000756cae clang::tidy::clangTidyMain(int, char const**) + 4734
33 libc.so.6 0x00007f904ae3314e
34 libc.so.6 0x00007f904ae33209 __libc_start_main + 137
35 clang-tidy 0x000000000074c8a5 _start + 37
zsh: segmentation fault (core dumped) clang-tidy --checks=performance-move-const-arg
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzEWF1v2zoS_TXMCyGDIvVhPfjBcWK0i6bN1tni7r4YFEXZbCVSICnH7q9fUJRsOY3rZPfiXiOIZWk0c2bm8PCDGiM2kvMZiG9BfHdDW7tVelbRQ2tuclUcZiBB_R-6A2gOcAQ3W6h5oyCrlORQc93KQCiAl93lyY5VVG4CK4oDDAK25eyHAeSu4bpUuqaS8aBWOx4wJY0NqN54V4OfNWsagJdGs6Nn923ayk62TePD3GutNHzeiopDqw9CbqBVsFK0gBQyVTeiolYoCQtqaU4NB2Tu31yotiqgVBbS1qqg4JYz--orsFQali4CwPhdEDH2sT6rS45bWUAhIcDLrao5wMuu8gAvC_UsXRru2tbNmf9XI0OlIZUH2FDNpYWF0JxZpQ8eQSn2vAhGIIJRQeC4iqrh0pWxe2NcNvhZQdOyrS-F0i9DfDdKvivCP1ZfPr8nwNdWdu89C7tVrYVlRTdm4p89frqfr-6hafNaWEhh3m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