[clang-tidy] Add misc-header-include-cycle check
authorPiotr Zegar <piotr.zegar@nokia.com>
Sat, 24 Jun 2023 07:01:32 +0000 (07:01 +0000)
committerPiotr Zegar <me@piotrzegar.pl>
Sat, 24 Jun 2023 08:06:48 +0000 (08:06 +0000)
commitf3aa6cc0f5d56752242203c2a9231c1bc230c15e
treeb3530630c1f5fe5ea1a10e80591b141d2cf6ebf8
parente5c7904fa0bfa5a24f192cfa7b9116560e1f5d43
[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]