[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-06-24 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7f6e0052a97f: [clang-tidy] Add misc-header-include-cycle check (authored by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144828/new/ https://rev

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-06-24 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 534183. PiotrZSL added a comment. Reorder warnigns & copy .cpp file to Output Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144828/new/ https://reviews.llvm.org/D144828 Files: clang-tools-extra/clang-tidy/m

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-06-24 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf3aa6cc0f5d5: [clang-tidy] Add misc-header-include-cycle check (authored by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144828/new/ https://rev

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-06-23 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 533952. PiotrZSL added a comment. This revision is now accepted and ready to land. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144828/new/ https://reviews.llvm.org/D144828 Files: clang-tools-extra/

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-04-15 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL planned changes to this revision. PiotrZSL added a comment. TODO: Split tests into multiple files (to isolate issue). If possible remove usage of FileCheck. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144828/new/ https://reviews.llvm.o

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-04-15 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. To be honest I have no idea why it failed, simply because there is CHECK-MESSAGES for that log. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144828/new/ https://reviews.llvm.org/D144828 _

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-04-15 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 513898. PiotrZSL added a comment. Small changes remove, file name Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144828/new/ https://reviews.llvm.org/D144828 Files: clang-tools-extra/clang-tidy/misc/CMakeLis

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-04-15 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. This breaks tests: http://45.33.8.238/linux/104455/step_8.txt Please take a look and revert for now if it takes a while to fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144828/new/ https://reviews.llvm.org/D144828 ___

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-04-15 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG9ece8753d5e6: [clang-tidy] Add misc-header-include-cycle check (authored by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-04-15 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 513896. PiotrZSL marked an inline comment as done. PiotrZSL added a comment. Fix one small nit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144828/new/ https://reviews.llvm.org/D144828 Files: clang-tools-

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-04-15 Thread Nathan James via Phabricator via cfe-commits
njames93 accepted this revision. njames93 added a comment. This revision is now accepted and ready to land. LGTM: Just one small nit. Comment at: clang-tools-extra/clang-tidy/misc/HeaderIncludeCycleCheck.cpp:148-150 +return std::any_of( +IgnoredFilesRegexes.begin()

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-04-15 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 513886. PiotrZSL marked 3 inline comments as done. PiotrZSL added a comment. Small redesign (review comments) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144828/new/ https://reviews.llvm.org/D144828 Files:

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-04-15 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL marked 4 inline comments as done. PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/misc/HeaderIncludeCycleCheck.cpp:134-135 +do { + if (CurrentIt->Name.empty()) +continue; + njames93 wrote: > Is this a case that

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-04-15 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/misc/HeaderIncludeCycleCheck.cpp:134-135 +do { + if (CurrentIt->Name.empty()) +continue; + Is this a case that can ever come up? If it does come up, surely any notes emitte

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-04-14 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 513694. PiotrZSL added a comment. Ping + Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144828/new/ https://reviews.llvm.org/D144828 Files: clang-tools-extra/clang-tidy/misc/CMakeLists.txt clang-too

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-03-08 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 503251. PiotrZSL added a comment. Rebase due to broken baseline Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144828/new/ https://reviews.llvm.org/D144828 Files: clang-tools-extra/clang-tidy/misc/CMakeLists

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-03-07 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 503144. PiotrZSL added a comment. Rebase due to failed clangd tests on windows Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144828/new/ https://reviews.llvm.org/D144828 Files: clang-tools-extra/clang-tidy/

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-03-07 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 503122. PiotrZSL added a comment. Ready for review, added new check option. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144828/new/ https://reviews.llvm.org/D144828 Files: clang-tools-extra/clang-tidy/mis

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-03-05 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL planned changes to this revision. PiotrZSL added a comment. Option need to be added Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144828/new/ https://reviews.llvm.org/D144828 ___ cfe-commits mai

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-03-05 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. TODO: Add option: ExcludeHeadersRegexp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144828/new/ https://reviews.llvm.org/D144828 ___ cfe-commits mailing list cfe-commits@lists.

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-03-05 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 502464. PiotrZSL added a comment. Added support for --include Added support for self-include of source file Added more tests Reworked include stack. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144828/new/ ht

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-03-05 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL marked 4 inline comments as done. PiotrZSL added a comment. "But maybe when we emit a warning for a specified include, we could put it in a set to not warn on that include again" I don't think so, in such case we hide include paths, and most of the time header guards should help here in

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-02-28 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/misc/HeaderIncludeCycleCheck.cpp:106-110 +if (History.size() == 2U) { + Check.diag(Loc, "direct self-inclusion of header file '%0'") + << History.back(); + return; +}

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-02-28 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. This is a great check that I've been meaning to work on for ages but never had time. It mostly looks good but there are a few issues I feel there is another issue that this can be very spammy with diagnostics(though clang-tidy is likely suppressing the duplicated ones).

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-02-28 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. PiotrZSL updated this revision to Diff 500591. PiotrZSL added a comment. Eugene.Zelenko added reviewers: aaron.ballman, carlosgalvezp. Eugene.Zelenko a