[PATCH] D137697: Move the isSelfContained function from clangd to libtooling.

2022-11-14 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a comment. No worries, thanks for fixing so quickly! I just happened to pull in the wrong moment... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137697/new/ https://reviews.llvm.org/D137697

[PATCH] D137697: Move the isSelfContained function from clangd to libtooling.

2022-11-14 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In D137697#3924305 , @Hahnfeld wrote: > @hokein it seems the unit test wasn't updated for the last-minute API change, > which breaks `check-all` for me. I've posted > https://reviews.llvm.org/D137927, could you take a look if tha

[PATCH] D137697: Move the isSelfContained function from clangd to libtooling.

2022-11-14 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a comment. @hokein it seems the unit test wasn't updated for the last-minute API change, which breaks `check-all` for me. I've posted https://reviews.llvm.org/D137927, could you take a look if that change is correct? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D137697: Move the isSelfContained function from clangd to libtooling.

2022-11-14 Thread Haojian Wu 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 rGdd46a08008f7: Move the isSelfContainedHeader function from clangd to libtooling. (authored by hokein). Repository: rG LLVM Github Monorepo CHANGE

[PATCH] D137697: Move the isSelfContained function from clangd to libtooling.

2022-11-13 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. nit: isSelfContained/isSelfContainedHeader in commit message Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137697/new/ https://reviews.llvm.org/D137697 ___ cfe-commits mailing lis

[PATCH] D137697: Move the isSelfContained function from clangd to libtooling.

2022-11-11 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137697/new/ https://reviews.llvm.org/D137697

[PATCH] D137697: Move the isSelfContained function from clangd to libtooling.

2022-11-11 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 474751. hokein marked an inline comment as done. hokein added a comment. use FileEntry in the API. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137697/new/ https://reviews.llvm.org/D137697 Files: clang-tools

[PATCH] D137697: Move the isSelfContained function from clangd to libtooling.

2022-11-11 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang/include/clang/Tooling/Inclusions/HeaderAnalysis.h:28 +/// dont-include-me pattern heuristically. +bool isSelfContainedHeader(FileID FID, const SourceManager &SM, + HeaderSearch &HeaderInfo); -

[PATCH] D137697: Move the isSelfContained function from clangd to libtooling.

2022-11-11 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. thanks, lgtm! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137697/new/ https://reviews.llvm.org/D137697 __

[PATCH] D137697: Move the isSelfContained function from clangd to libtooling.

2022-11-11 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang/include/clang/Tooling/Inclusions/Header.h:21 +/// +/// A header is considered self-contained if either it has a proper header guard +/// or it doesn't has dont-include-me-similar pattern. kadircet wrote: > kadircet

[PATCH] D137697: Move the isSelfContained function from clangd to libtooling.

2022-11-11 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 474735. hokein added a comment. getBufferData => getMemoryBufferForFileOrNone Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137697/new/ https://reviews.llvm.org/D137697 Files: clang-tools-extra/clangd/Headers

[PATCH] D137697: Move the isSelfContained function from clangd to libtooling.

2022-11-11 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang/lib/Tooling/Inclusions/Header.cpp:64 + // particular preprocessor state, usually set up by another header. + return !isDontIncludeMeHeader(SM.getBufferData(SM.translateFile(FE))); +} sammccall wrote: > kadircet

[PATCH] D137697: Move the isSelfContained function from clangd to libtooling.

2022-11-11 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang/lib/Tooling/Inclusions/Header.cpp:64 + // particular preprocessor state, usually set up by another header. + return !isDontIncludeMeHeader(SM.getBufferData(SM.translateFile(FE))); +} kadircet wrote: > sammccall

[PATCH] D137697: Move the isSelfContained function from clangd to libtooling.

2022-11-11 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang/include/clang/Tooling/Inclusions/Header.h:21 +/// +/// A header is considered self-contained if either it has a proper header guard +/// or it doesn't has dont-include-me-similar pattern. kadircet wrote: > let's

[PATCH] D137697: Move the isSelfContained function from clangd to libtooling.

2022-11-11 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang/lib/Tooling/Inclusions/Header.cpp:64 + // particular preprocessor state, usually set up by another header. + return !isDontIncludeMeHeader(SM.getBufferData(SM.translateFile(FE))); +} kadircet wrote: > `translat

[PATCH] D137697: Move the isSelfContained function from clangd to libtooling.

2022-11-11 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 474707. hokein marked 3 inline comments as done. hokein added a comment. address comments: - mention #import case - rename file name - API: FileEntry => FileID Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D13769

[PATCH] D137697: Move the isSelfContained function from clangd to libtooling.

2022-11-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang/include/clang/Tooling/Inclusions/Header.h:1 +//===--- Header.h *- C++-*-===// +// rather than calling this `Header` can we call this `HeaderAnalysis`? ===

[PATCH] D137697: Move the isSelfContained function from clangd to libtooling.

2022-11-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added reviewers: kadircet, sammccall. Herald added a subscriber: arphaman. Herald added a project: All. hokein requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. Herald added projects: clang, clang-tools-extra. We plan to reuse