[clang] [clang-tools-extra] [Tooling] Resolve relative "directory" against the compilation database (PR #235400)

via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 24 23:22:14 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results

* 63690 tests passed
* 839 tests skipped
* 1 test failed

## Failed Tests
(click on a test name to see its output)

### Clang Tools
<details>
<summary>Clang Tools.clang-doc/DR-131697.cpp</summary>

```
Exit Code: -6

Command Output (stdout):
--
# RUN: at line 1
rm -rf /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-doc/Output/DR-131697.cpp.tmp && mkdir -p /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-doc/Output/DR-131697.cpp.tmp
# executed command: rm -rf /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-doc/Output/DR-131697.cpp.tmp
# note: command had no output on stdout or stderr
# executed command: mkdir -p /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-doc/Output/DR-131697.cpp.tmp
# note: command had no output on stdout or stderr
# RUN: at line 2
split-file /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-doc/DR-131697.cpp /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-doc/Output/DR-131697.cpp.tmp
# executed command: split-file /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-doc/DR-131697.cpp /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-doc/Output/DR-131697.cpp.tmp
# note: command had no output on stdout or stderr
# RUN: at line 3
clang-doc -format=html /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-doc/Output/DR-131697.cpp.tmp/compile_commands.json /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-doc/Output/DR-131697.cpp.tmp/main.cpp
# executed command: clang-doc -format=html /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-doc/Output/DR-131697.cpp.tmp/compile_commands.json /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-doc/Output/DR-131697.cpp.tmp/main.cpp
# .---command stderr------------
# | LLVM ERROR: Cannot chdir into "/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-doc/Output/DR-131697.cpp.tmp/foo"!
# |  #0 0x0000000000f6510b llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Unix/Signals.inc:931:13
# |  #1 0x0000000000f61fb5 llvm::sys::RunSignalHandlers() /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Signals.cpp:109:18
# |  #2 0x0000000000f65b4b SignalHandler(int, siginfo_t*, void*) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Unix/Signals.inc:474:38
# |  #3 0x00007bfbcbdafcb0 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x45cb0)
# |  #4 0x00007bfbcbe101ac pthread_kill (/usr/lib/x86_64-linux-gnu/libc.so.6+0xa61ac)
# |  #5 0x00007bfbcbdafb7e raise (/usr/lib/x86_64-linux-gnu/libc.so.6+0x45b7e)
# |  #6 0x00007bfbcbd928ec abort (/usr/lib/x86_64-linux-gnu/libc.so.6+0x288ec)
# |  #7 0x0000000000eda255 llvm::report_fatal_error(llvm::Twine const&, bool) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/ErrorHandling.cpp:137:5
# |  #8 0x0000000000fc91ae clang::tooling::ClangTool::run(clang::tooling::ToolAction*) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Tooling/Tooling.cpp:601:7
# |  #9 0x0000000000fc3ce7 clang::tooling::StandaloneToolExecutor::execute(llvm::ArrayRef<std::pair<std::unique_ptr<clang::tooling::FrontendActionFactory, std::default_delete<clang::tooling::FrontendActionFactory>>, std::function<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> (std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, llvm::StringRef)>>>) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Tooling/StandaloneExecution.cpp:66:7
# | #10 0x0000000000fb5aa0 ~vector /usr/lib/gcc/x86_64-linux-gnu/15/../../../../include/c++/15/bits/stl_vector.h:802:30
# | #11 0x0000000000fb5aa0 clang::tooling::ToolExecutor::execute(std::unique_ptr<clang::tooling::FrontendActionFactory, std::default_delete<clang::tooling::FrontendActionFactory>>, std::function<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> (std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, llvm::StringRef)>) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Tooling/Execution.cpp:56:1
# | #12 0x0000000000eb26b5 getPtr /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/Support/Error.h:278:42
# | #13 0x0000000000eb26b5 operator bool /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/Support/Error.h:241:16
# | #14 0x0000000000eb26b5 handleMappingFailures /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/clang-doc/tool/ClangDocMain.cpp:236:8
# | #15 0x0000000000eb26b5 main /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/clang-doc/tool/ClangDocMain.cpp:316:15
# | #16 0x00007bfbcbd94601 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x2a601)
# | #17 0x00007bfbcbd94718 __libc_start_main (/usr/lib/x86_64-linux-gnu/libc.so.6+0x2a718)
# | #18 0x0000000000eb08a5 _start (/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang-doc+0xeb08a5)
# `-----------------------------
# error: command failed with exit status: -6

--

```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

https://github.com/llvm/llvm-project/pull/235400


More information about the cfe-commits mailing list