[clang-tidy] Add misc-header-include-cycle check
authorPiotr Zegar <piotr.zegar@nokia.com>
Sat, 24 Jun 2023 10:59:30 +0000 (10:59 +0000)
committerPiotr Zegar <me@piotrzegar.pl>
Sat, 24 Jun 2023 11:00:13 +0000 (11:00 +0000)
commit7f6e0052a97f13a5f595f3fd0c135c2c4db119d4
tree61ace750556cf7fd1fb44cf8000222c6c172a7b5
parentf8003689f12d781f5128feb0655f12af37285085
[clang-tidy] Add misc-header-include-cycle check

Check detects cyclic #include dependencies between user-defined headers.

Reviewed By: njames93

Differential Revision: https://reviews.llvm.org/D144828
27 files changed:
clang-tools-extra/clang-tidy/misc/CMakeLists.txt
clang-tools-extra/clang-tidy/misc/HeaderIncludeCycleCheck.cpp [new file with mode: 0644]
clang-tools-extra/clang-tidy/misc/HeaderIncludeCycleCheck.h [new file with mode: 0644]
clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
clang-tools-extra/docs/ReleaseNotes.rst
clang-tools-extra/docs/clang-tidy/checks/list.rst
clang-tools-extra/docs/clang-tidy/checks/misc/header-include-cycle.rst [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.first-d.hpp [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.first.hpp [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.fourth-d.hpp [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.fourth.hpp [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.second-d.hpp [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.second.hpp [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.self-d.hpp [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.self-e.hpp [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.self-i.hpp [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.self-n.hpp [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.self-o.hpp [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.self.hpp [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.third-d.hpp [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/header-include-cycle.third.hpp [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/system/header-include-cycle.first-s.hpp [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/system/header-include-cycle.fourth-s.hpp [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/system/header-include-cycle.second-s.hpp [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/system/header-include-cycle.self-s.hpp [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/checkers/misc/Inputs/system/header-include-cycle.third-s.hpp [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/checkers/misc/header-include-cycle.cpp [new file with mode: 0644]