Author: Alexis Engelke
Date: 2026-04-12T07:45:06+02:00
New Revision: 2798a107e63b4df00009df1a09f6e80c74cd3792

URL: 
https://github.com/llvm/llvm-project/commit/2798a107e63b4df00009df1a09f6e80c74cd3792
DIFF: 
https://github.com/llvm/llvm-project/commit/2798a107e63b4df00009df1a09f6e80c74cd3792.diff

LOG: [Clang-tidy] Add dummy compile_commands.json for broken test (#191635)

Consequence of https://github.com/llvm/llvm-project/issues/182526.

With PCH used for unit tests (#191402), this breaks now due to matching:

llvm-build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/custom-query-check.cpp.tmp/cqc-main.cpp

with:

llvm-build/tools/clang/tools/extra/clangd/unittests/DecisionForestRuntimeTest.cpp

Added: 
    

Modified: 
    clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check.cpp

Removed: 
    


################################################################################
diff  --git 
a/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check.cpp 
b/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check.cpp
index a57029908d3e4..ad225e4d14f41 100644
--- a/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check.cpp
+++ b/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check.cpp
@@ -5,6 +5,8 @@
 // Using cqc-main.cpp in the hope that we don't have a file with that name in
 // our source tree. See: https://github.com/llvm/llvm-project/issues/182526
 // RUN: sed -e "s:INPUT_DIR:%S/Inputs/custom-query-check:g" -e 
"s:OUT_DIR:%t:g" -e "s:MAIN_FILE:%s:g" 
%S/Inputs/custom-query-check/vfsoverlay.yaml > %t.yaml
+// RUN: mkdir -p %t
+// RUN: echo '[{"file": "cqc-main.cpp", "directory": "%t", "command": "clang++ 
-c cqc-main.cpp"}]' > %t/compile_commands.json
 // RUN: clang-tidy --experimental-custom-checks %t/cqc-main.cpp 
-checks='-*,custom-*' -vfsoverlay %t.yaml | FileCheck %s 
--check-prefix=CHECK-SAME-DIR
 // RUN: clang-tidy --experimental-custom-checks %t/subdir/cqc-main.cpp 
-checks='-*,custom-*' -vfsoverlay %t.yaml | FileCheck %s 
--check-prefix=CHECK-SUB-DIR-BASE
 // RUN: clang-tidy --experimental-custom-checks 
%t/subdir-override/cqc-main.cpp -checks='-*,custom-*' -vfsoverlay %t.yaml | 
FileCheck %s --check-prefix=CHECK-SUB-DIR-OVERRIDE


        
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to