jackua22
jackua22
The issue is reproducible with clang 17 and 18. This file ``` #include std::string space(size_t n) { return std::string(n, ' '); } ``` generates a warning `warning: avoid repeating the...
The crash is the same with llvm 17 and llvm 18. The output looks like ``` clang-tidy: /.../llvm-v17.0.6d1rh74_lnx86/llvm-project/clang/lib/Basic/SourceManager.cpp:868: clang::FileID clang::SourceManager::getFileIDLoaded(clang::SourceLocation::UIntTy) const: Assertion `0 && "Invalid SLocOffset or bad function choice"'...
When tidy reports a violations, it looks like ``` an exception may be thrown in function 'main' which should not throw exceptions [bugprone-exception-escape] 2801 | int main(int argc, char *argv[])...
clang-tidy llvm-v18.1.4 crashes with an attached stack. It happens during analysis of a header file renamed to .cpp. There is a chance that the header is not self-contained and there...
clang-tidy llvm-v18.1.4 crashes with an attached stack. It is a very popular crash; about 50 files failed with the same stack, and the priority of the issue is high. [ua_Debug_corun_src_coInit.C.log](https://github.com/llvm/llvm-project/files/15049997/ua_Debug_corun_src_coInit.C.log)...
clang-tidy llvm-v18.1.4 crashes with similar stacks but different headers, see three attachments. [ua_Compiler_sideFile_src_swfvDB.C.log](https://github.com/llvm/llvm-project/files/15050007/ua_Compiler_sideFile_src_swfvDB.C.log) [ua_Debug_uart_src_uart_ckpt_sr.C.log](https://github.com/llvm/llvm-project/files/15050008/ua_Debug_uart_src_uart_ckpt_sr.C.log) [ua_Jupiter_beDB_src_ffDB.C.log](https://github.com/llvm/llvm-project/files/15050009/ua_Jupiter_beDB_src_ffDB.C.log)
In this program ```cpp #define my_cast(type, p) reinterpret_cast(p) void foo(void *p) { (void)my_cast(int, p); } ``` This command ` % /grid/common/test/llvm-v17.0.6d1rh74_lnx86/bin/clang-tidy --fix --checks=bugprone-macro-parentheses bugprone-macro-parentheses.cpp -- -std=c++17 -stdlib=libc++` converts the macro...
We use Infiniband API installed on hundreds of servers in our farm. It is in /usr/include/infiniband/verbs.h. For R&D, it is third-party software. This program `#include ` Then compilation fails like...
This is new with LLVM 22; 21 works fine. A few dozens of files crashes in two big groups. I asked GPT 5.3-codex to create a minimal test case, and...