https://github.com/unterumarmung created 
https://github.com/llvm/llvm-project/pull/244403

Move the lit tests and private header fixtures for `misc-header-include-cycle` 
into `misc/header-include-cycle/`. The main test still copies itself under the 
filename expected by its self-inclusion and diagnostic checks. The standalone 
self-inclusion test uses its new filename in its include directive.

This is a migration pilot for the proposed per-check lit layout.

### Testing

Both tests passed when run directly with lit and through 
`check-clang-extra-clang-tidy-checkers-misc-header-include-cycle`.


>From e1160012113e82bc09760bd4a54eba6a92172847 Mon Sep 17 00:00:00 2001
From: Daniil Dudkin <[email protected]>
Date: Fri, 20 Nov 2026 00:02:17 +0300
Subject: [PATCH] [clang-tidy] Move header-include-cycle tests into a per-check
 directory

Move the private include graph with the tests. Keep the diagnostic-sensitive 
source name when copying the main test into its temporary directory, and update 
the standalone self-include test for its new name.
---
 .../Inputs/header-include-cycle.first-d.hpp                     | 0
 .../Inputs/header-include-cycle.first.hpp                       | 0
 .../Inputs/header-include-cycle.fourth-d.hpp                    | 0
 .../Inputs/header-include-cycle.fourth.hpp                      | 0
 .../Inputs/header-include-cycle.second-d.hpp                    | 0
 .../Inputs/header-include-cycle.second.hpp                      | 0
 .../Inputs/header-include-cycle.self-d.hpp                      | 0
 .../Inputs/header-include-cycle.self-e.hpp                      | 0
 .../Inputs/header-include-cycle.self-i.hpp                      | 0
 .../Inputs/header-include-cycle.self-n.hpp                      | 0
 .../Inputs/header-include-cycle.self-o.hpp                      | 0
 .../Inputs/header-include-cycle.self.hpp                        | 0
 .../Inputs/header-include-cycle.third-d.hpp                     | 0
 .../Inputs/header-include-cycle.third.hpp                       | 0
 .../Inputs/system/header-include-cycle.first-s.hpp              | 0
 .../Inputs/system/header-include-cycle.fourth-s.hpp             | 0
 .../Inputs/system/header-include-cycle.second-s.hpp             | 0
 .../Inputs/system/header-include-cycle.self-s.hpp               | 0
 .../Inputs/system/header-include-cycle.third-s.hpp              | 0
 .../self-include.cpp}                                           | 2 +-
 .../{header-include-cycle.cpp => header-include-cycle/test.cpp} | 0
 21 files changed, 1 insertion(+), 1 deletion(-)
 rename clang-tools-extra/test/clang-tidy/checkers/misc/{ => 
header-include-cycle}/Inputs/header-include-cycle.first-d.hpp (100%)
 rename clang-tools-extra/test/clang-tidy/checkers/misc/{ => 
header-include-cycle}/Inputs/header-include-cycle.first.hpp (100%)
 rename clang-tools-extra/test/clang-tidy/checkers/misc/{ => 
header-include-cycle}/Inputs/header-include-cycle.fourth-d.hpp (100%)
 rename clang-tools-extra/test/clang-tidy/checkers/misc/{ => 
header-include-cycle}/Inputs/header-include-cycle.fourth.hpp (100%)
 rename clang-tools-extra/test/clang-tidy/checkers/misc/{ => 
header-include-cycle}/Inputs/header-include-cycle.second-d.hpp (100%)
 rename clang-tools-extra/test/clang-tidy/checkers/misc/{ => 
header-include-cycle}/Inputs/header-include-cycle.second.hpp (100%)
 rename clang-tools-extra/test/clang-tidy/checkers/misc/{ => 
header-include-cycle}/Inputs/header-include-cycle.self-d.hpp (100%)
 rename clang-tools-extra/test/clang-tidy/checkers/misc/{ => 
header-include-cycle}/Inputs/header-include-cycle.self-e.hpp (100%)
 rename clang-tools-extra/test/clang-tidy/checkers/misc/{ => 
header-include-cycle}/Inputs/header-include-cycle.self-i.hpp (100%)
 rename clang-tools-extra/test/clang-tidy/checkers/misc/{ => 
header-include-cycle}/Inputs/header-include-cycle.self-n.hpp (100%)
 rename clang-tools-extra/test/clang-tidy/checkers/misc/{ => 
header-include-cycle}/Inputs/header-include-cycle.self-o.hpp (100%)
 rename clang-tools-extra/test/clang-tidy/checkers/misc/{ => 
header-include-cycle}/Inputs/header-include-cycle.self.hpp (100%)
 rename clang-tools-extra/test/clang-tidy/checkers/misc/{ => 
header-include-cycle}/Inputs/header-include-cycle.third-d.hpp (100%)
 rename clang-tools-extra/test/clang-tidy/checkers/misc/{ => 
header-include-cycle}/Inputs/header-include-cycle.third.hpp (100%)
 rename clang-tools-extra/test/clang-tidy/checkers/misc/{ => 
header-include-cycle}/Inputs/system/header-include-cycle.first-s.hpp (100%)
 rename clang-tools-extra/test/clang-tidy/checkers/misc/{ => 
header-include-cycle}/Inputs/system/header-include-cycle.fourth-s.hpp (100%)
 rename clang-tools-extra/test/clang-tidy/checkers/misc/{ => 
header-include-cycle}/Inputs/system/header-include-cycle.second-s.hpp (100%)
 rename clang-tools-extra/test/clang-tidy/checkers/misc/{ => 
header-include-cycle}/Inputs/system/header-include-cycle.self-s.hpp (100%)
 rename clang-tools-extra/test/clang-tidy/checkers/misc/{ => 
header-include-cycle}/Inputs/system/header-include-cycle.third-s.hpp (100%)
 rename 
clang-tools-extra/test/clang-tidy/checkers/misc/{header-include-cycle.self.cpp 
=> header-include-cycle/self-include.cpp} (61%)
 rename 
clang-tools-extra/test/clang-tidy/checkers/misc/{header-include-cycle.cpp => 
header-include-cycle/test.cpp} (100%)

diff --git 
a/clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.first-d.hpp
 
b/clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/Inputs/header-include-cycle.first-d.hpp
similarity index 100%
rename from 
clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.first-d.hpp
rename to 
clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/Inputs/header-include-cycle.first-d.hpp
diff --git 
a/clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.first.hpp
 
b/clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/Inputs/header-include-cycle.first.hpp
similarity index 100%
rename from 
clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.first.hpp
rename to 
clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/Inputs/header-include-cycle.first.hpp
diff --git 
a/clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.fourth-d.hpp
 
b/clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/Inputs/header-include-cycle.fourth-d.hpp
similarity index 100%
rename from 
clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.fourth-d.hpp
rename to 
clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/Inputs/header-include-cycle.fourth-d.hpp
diff --git 
a/clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.fourth.hpp
 
b/clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/Inputs/header-include-cycle.fourth.hpp
similarity index 100%
rename from 
clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.fourth.hpp
rename to 
clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/Inputs/header-include-cycle.fourth.hpp
diff --git 
a/clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.second-d.hpp
 
b/clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/Inputs/header-include-cycle.second-d.hpp
similarity index 100%
rename from 
clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.second-d.hpp
rename to 
clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/Inputs/header-include-cycle.second-d.hpp
diff --git 
a/clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.second.hpp
 
b/clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/Inputs/header-include-cycle.second.hpp
similarity index 100%
rename from 
clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.second.hpp
rename to 
clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/Inputs/header-include-cycle.second.hpp
diff --git 
a/clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.self-d.hpp
 
b/clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/Inputs/header-include-cycle.self-d.hpp
similarity index 100%
rename from 
clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.self-d.hpp
rename to 
clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/Inputs/header-include-cycle.self-d.hpp
diff --git 
a/clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.self-e.hpp
 
b/clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/Inputs/header-include-cycle.self-e.hpp
similarity index 100%
rename from 
clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.self-e.hpp
rename to 
clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/Inputs/header-include-cycle.self-e.hpp
diff --git 
a/clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.self-i.hpp
 
b/clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/Inputs/header-include-cycle.self-i.hpp
similarity index 100%
rename from 
clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.self-i.hpp
rename to 
clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/Inputs/header-include-cycle.self-i.hpp
diff --git 
a/clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.self-n.hpp
 
b/clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/Inputs/header-include-cycle.self-n.hpp
similarity index 100%
rename from 
clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.self-n.hpp
rename to 
clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/Inputs/header-include-cycle.self-n.hpp
diff --git 
a/clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.self-o.hpp
 
b/clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/Inputs/header-include-cycle.self-o.hpp
similarity index 100%
rename from 
clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.self-o.hpp
rename to 
clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/Inputs/header-include-cycle.self-o.hpp
diff --git 
a/clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.self.hpp
 
b/clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/Inputs/header-include-cycle.self.hpp
similarity index 100%
rename from 
clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.self.hpp
rename to 
clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/Inputs/header-include-cycle.self.hpp
diff --git 
a/clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.third-d.hpp
 
b/clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/Inputs/header-include-cycle.third-d.hpp
similarity index 100%
rename from 
clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.third-d.hpp
rename to 
clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/Inputs/header-include-cycle.third-d.hpp
diff --git 
a/clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.third.hpp
 
b/clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/Inputs/header-include-cycle.third.hpp
similarity index 100%
rename from 
clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.third.hpp
rename to 
clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/Inputs/header-include-cycle.third.hpp
diff --git 
a/clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/system/header-include-cycle.first-s.hpp
 
b/clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/Inputs/system/header-include-cycle.first-s.hpp
similarity index 100%
rename from 
clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/system/header-include-cycle.first-s.hpp
rename to 
clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/Inputs/system/header-include-cycle.first-s.hpp
diff --git 
a/clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/system/header-include-cycle.fourth-s.hpp
 
b/clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/Inputs/system/header-include-cycle.fourth-s.hpp
similarity index 100%
rename from 
clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/system/header-include-cycle.fourth-s.hpp
rename to 
clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/Inputs/system/header-include-cycle.fourth-s.hpp
diff --git 
a/clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/system/header-include-cycle.second-s.hpp
 
b/clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/Inputs/system/header-include-cycle.second-s.hpp
similarity index 100%
rename from 
clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/system/header-include-cycle.second-s.hpp
rename to 
clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/Inputs/system/header-include-cycle.second-s.hpp
diff --git 
a/clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/system/header-include-cycle.self-s.hpp
 
b/clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/Inputs/system/header-include-cycle.self-s.hpp
similarity index 100%
rename from 
clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/system/header-include-cycle.self-s.hpp
rename to 
clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/Inputs/system/header-include-cycle.self-s.hpp
diff --git 
a/clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/system/header-include-cycle.third-s.hpp
 
b/clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/Inputs/system/header-include-cycle.third-s.hpp
similarity index 100%
rename from 
clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/system/header-include-cycle.third-s.hpp
rename to 
clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/Inputs/system/header-include-cycle.third-s.hpp
diff --git 
a/clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle.self.cpp 
b/clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/self-include.cpp
similarity index 61%
rename from 
clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle.self.cpp
rename to 
clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/self-include.cpp
index 245dd0a65a8b42..6ab51c49549685 100644
--- 
a/clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle.self.cpp
+++ 
b/clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/self-include.cpp
@@ -1,3 +1,3 @@
 // RUN: not clang-tidy %s -checks='-*,misc-header-include-cycle'
 
-#include "header-include-cycle.self.cpp"
+#include "self-include.cpp"
diff --git 
a/clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle.cpp 
b/clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/test.cpp
similarity index 100%
rename from 
clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle.cpp
rename to 
clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle/test.cpp

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

Reply via email to