[PATCH] D113995: [clangd] Dex Trigrams: Improve query trigram generation

2021-11-16 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added a reviewer: sammccall. Herald added subscribers: usaxena95, arphaman. kbobyrev requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. These are the trigrams for quer

[PATCH] D113995: [clangd] Dex Trigrams: Improve query trigram generation

2021-11-16 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 387615. kbobyrev added a comment. Add a small comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113995/new/ https://reviews.llvm.org/D113995 Files: clang-tools-extra/clangd/index/dex/Trigram.cpp clan

[PATCH] D114072: [clangd] Record IWYU pragma keep in the IncludeStructure

2021-11-17 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added a reviewer: sammccall. Herald added subscribers: usaxena95, arphaman. kbobyrev requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. This will allow the IncludeClea

[PATCH] D114034: [clang-tidy] fix debug-only test failure

2021-11-18 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev accepted this revision. kbobyrev added a comment. This revision is now accepted and ready to land. LG, thanks! I skimmed through the original patch and couldn't understand the `RenameFcn` part, thanks for the explanation! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D114034: [clang-tidy] fix debug-only test failure

2021-11-19 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG85e03cb7ebac: [clang-tidy] fix debug-only test failure (authored by mattbeardsley, committed by kbobyrev). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1140

[PATCH] D114034: [clang-tidy] fix debug-only test failure

2021-11-19 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. In D114034#3141446 , @mattbeardsley wrote: > @dstenb Thanks for the confirmation! > > @kbobyrev Sorry about my mixup! Would you be able to help me commit this? Done! Thank you for the patch! Repository: rG LLVM Github Monor

[PATCH] D113995: [clangd] Dex Trigrams: Improve query trigram generation

2021-11-19 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 388461. kbobyrev added a comment. Add improvements for identifier trigram generation and make query & id generators consistent with each other. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113995/new/ https:/

[PATCH] D114287: [clangd] IncludeCleaner: Traverse unresolved expressions

2021-11-19 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added a reviewer: sammccall. Herald added subscribers: usaxena95, kadircet, arphaman. kbobyrev requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Repository: rG LLVM

[PATCH] D114287: [clangd] IncludeCleaner: Traverse unresolved expressions

2021-11-22 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 388816. kbobyrev marked 2 inline comments as done. kbobyrev added a comment. Address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114287/new/ https://reviews.llvm.org/D114287 Files: clang-

[PATCH] D114287: [clangd] IncludeCleaner: Mark possible expr resolutions as used

2021-11-22 Thread Kirill Bobyrev 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 rGb5f20372a82f: [clangd] IncludeCleaner: Mark possible expr resolutions as used (authored by kbobyrev). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D114370: [clangd] IncludeCleaner: Attribute symbols from non self-contained headers to their parents

2021-11-22 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added a reviewer: kadircet. Herald added subscribers: usaxena95, arphaman. kbobyrev requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. When a symbol comes from the non

[PATCH] D114370: [clangd] IncludeCleaner: Attribute symbols from non self-contained headers to their parents

2021-11-23 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 389131. kbobyrev marked 5 inline comments as done. kbobyrev added a comment. Address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114370/new/ https://reviews.llvm.org/D114370 Files: clang-

[PATCH] D114370: [clangd] IncludeCleaner: Attribute symbols from non self-contained headers to their parents

2021-11-23 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. In D114370#3148143 , @sammccall wrote: > The ReferencedFiles is designed to make add() as cheap as possible, and do > any per-file logic after folding the fileIDs together. > This keeps that loop tighter and also isolates the co

[PATCH] D114370: [clangd] IncludeCleaner: Attribute symbols from non self-contained headers to their parents

2021-11-23 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 389183. kbobyrev marked 2 inline comments as done. kbobyrev added a comment. Resolve most comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114370/new/ https://reviews.llvm.org/D114370 Files: clang-to

[PATCH] D114370: [clangd] IncludeCleaner: Attribute symbols from non self-contained headers to their parents

2021-11-23 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/IncludeCleaner.cpp:262 + ID != SM.getMainFileID() && FE && + !isSelfContainedHeader(PP, ID, FE);) { + ID = SM.getFileID(SM.getIncludeLoc(ID)); sammccall wrote: > it seems li

[PATCH] D114370: [clangd] IncludeCleaner: Attribute symbols from non self-contained headers to their parents

2021-11-24 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 389454. kbobyrev marked 6 inline comments as done. kbobyrev added a comment. Herald added a project: clang. Resolve review comments. This turned into a rather large refactoring change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https

[PATCH] D114370: [clangd] IncludeCleaner: Attribute symbols from non self-contained headers to their parents

2021-11-24 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 389457. kbobyrev added a comment. Untangle BeforeExecute call ordering change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114370/new/ https://reviews.llvm.org/D114370 Files: clang-tools-extra/clangd/Code

[PATCH] D114525: [clang] Change ordering of PreableCallbacks to make sure PP can be referenced in them

2021-11-24 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: kadircet, sammccall. kbobyrev requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Currently, BeforeExecute is called before BeginSourceFile which does not allow using PP in the callbacks

[PATCH] D114525: [clang] Change ordering of PreableCallbacks to make sure PP can be referenced in them

2021-11-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbad897778638: [clang] Change ordering of PreableCallbacks to make sure PP can be referenced… (authored by kbobyrev). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D114370: [clangd] IncludeCleaner: Attribute symbols from non self-contained headers to their parents

2021-11-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 389946. kbobyrev marked 6 inline comments as done. kbobyrev added a comment. Address review comments. Next step: split this patch into two, as suggested. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114370/new

[PATCH] D114370: [clangd] IncludeCleaner: Attribute symbols from non self-contained headers to their parents

2021-11-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 389947. kbobyrev added a comment. Leave the feature changes (IncludeCleaner bits) out of this patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114370/new/ https://reviews.llvm.org/D114370 Files: clang-to

[PATCH] D114370: [clangd] Record information about non self-contained headers in IncludeStructure

2021-11-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 389950. kbobyrev added a comment. [clangd] IncludeCleaner: Attribute symbols from non self-contained headers to their parents When a symbol comes from the non self-contained header, we recursively uplift the file we consider used to the first includer that

[PATCH] D114370: [clangd] Record information about non self-contained headers in IncludeStructure

2021-11-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 389952. kbobyrev added a comment. Change base to D114370 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114370/new/ https://reviews.llvm.org/D114370 Files: clang-tools-ext

[PATCH] D114370: [clangd] Record information about non self-contained headers in IncludeStructure

2021-11-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 389953. kbobyrev added a comment. Get the changes back to this patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114370/new/ https://reviews.llvm.org/D114370 Files: clang-tools-extra/clangd/CodeComplete.

[PATCH] D114623: [clangd] IncludeCleaner: Attribute symbols from non self-contained headers to their parents

2021-11-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added a reviewer: sammccall. Herald added subscribers: usaxena95, kadircet, arphaman. kbobyrev requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. When a symbol comes f

[PATCH] D114370: [clangd] Record information about non self-contained headers in IncludeStructure

2021-11-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/Headers.h:167 + void recordNonSelfContained(HeaderID ID) { NonSelfContained.insert(ID); } + sammccall wrote: > could consider `friend class RecordHeaders`, either is ugly, up to you That was

[PATCH] D114370: [clangd] Record information about non self-contained headers in IncludeStructure

2021-11-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 390024. kbobyrev marked 2 inline comments as done. kbobyrev added a comment. Get rid of the setter in IncludeStructure. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114370/new/ https://reviews.llvm.org/D11437

[PATCH] D114370: [clangd] Record information about non self-contained headers in IncludeStructure

2021-11-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/Headers.h:167 + void recordNonSelfContained(HeaderID ID) { NonSelfContained.insert(ID); } + sammccall wrote: > kbobyrev wrote: > > sammccall wrote: > > > could consider `friend class RecordHe

[PATCH] D114370: [clangd] Record information about non self-contained headers in IncludeStructure

2021-11-26 Thread Kirill Bobyrev 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 rGcd0ca5a0eaa1: [clangd] Record information about non self-contained headers in IncludeStructure (authored by kbobyrev). Repository: rG LLVM Github

[PATCH] D114623: [clangd] IncludeCleaner: Attribute symbols from non self-contained headers to their parents

2021-11-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 390051. kbobyrev marked 2 inline comments as done. kbobyrev added a comment. Address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114623/new/ https://reviews.llvm.org/D114623 Files: clang-

[PATCH] D114623: [clangd] IncludeCleaner: Attribute symbols from non self-contained headers to their parents

2021-11-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 390052. kbobyrev added a comment. Add some docs for the helper function. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114623/new/ https://reviews.llvm.org/D114623 Files: clang-tools-extra/clangd/IncludeCle

[PATCH] D114623: [clangd] IncludeCleaner: Attribute symbols from non self-contained headers to their parents

2021-11-26 Thread Kirill Bobyrev 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 rG34cc210aa8af: [clangd] IncludeCleaner: Attribute symbols from non self-contained headers to… (authored by kbobyrev). Repository: rG LLVM Github Mo

[PATCH] D113995: [clangd] Dex Trigrams: Improve query trigram generation

2021-11-29 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 390297. kbobyrev marked 5 inline comments as done. kbobyrev added a comment. Address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113995/new/ https://reviews.llvm.org/D113995 Files: clang-

[PATCH] D113995: [clangd] Dex Trigrams: Improve query trigram generation

2021-11-29 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 390298. kbobyrev added a comment. Slightly improve docs. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113995/new/ https://reviews.llvm.org/D113995 Files: clang-tools-extra/clangd/index/dex/Trigram.cpp cl

[PATCH] D114077: [clangd] Basic IncludeCleaner support for c/c++ standard library

2021-11-30 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. Mostly LG, few nits. Comment at: clang-tools-extra/clangd/Headers.h:32 namespace clang { +class NamespaceDecl; namespace clangd { Do we need a forward decl here? Comment at: clang-tools-extra/clangd/Headers.h:42 +p

[PATCH] D113995: [clangd] Dex Trigrams: Improve query trigram generation

2021-11-30 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 390627. kbobyrev marked 3 inline comments as done. kbobyrev added a comment. Address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113995/new/ https://reviews.llvm.org/D113995 Files: clang-

[PATCH] D113995: [clangd] Dex Trigrams: Improve query trigram generation

2021-11-30 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/index/dex/Trigram.cpp:47 + const size_t NPOS = std::numeric_limits::max(); + llvm::SmallVector> Next(LowercaseIdentifier.size()); + size_t NextTail = NPOS, NextHead = NPOS; sammccall wrote:

[PATCH] D114072: [clangd] Record IWYU pragma keep in the IncludeStructure

2021-11-30 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 390631. kbobyrev marked an inline comment as done. kbobyrev added a comment. Change the API, update the patch. It's crashing ATM, investigating the problems. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114072

[PATCH] D114072: [clangd] Record IWYU pragma keep in the IncludeStructure

2021-11-30 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 390639. kbobyrev marked an inline comment as done. kbobyrev added a comment. Fix failures, address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114072/new/ https://reviews.llvm.org/D114072 F

[PATCH] D114072: [clangd] Record IWYU pragma keep in the IncludeStructure

2021-11-30 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/Headers.h:130 + // IWYU pragmas but it needs to be explicitly added to as a preprocessor + // comment handler. PP wants to own the PPCallbacks, so the typical way to + // do both is: sammccal

[PATCH] D113995: [clangd] Dex Trigrams: Improve query trigram generation

2021-11-30 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 390641. kbobyrev marked 5 inline comments as done. kbobyrev added a comment. Address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113995/new/ https://reviews.llvm.org/D113995 Files: clang-

[PATCH] D113995: [clangd] Dex Trigrams: Improve query trigram generation

2021-11-30 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 390643. kbobyrev added a comment. Remove refactoring leftovers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113995/new/ https://reviews.llvm.org/D113995 Files: clang-tools-extra/clangd/index/dex/Trigram.c

[PATCH] D114864: [clangd] IncludeClenaer: Don't mark forward declarations of a class if it's declared in the main file

2021-12-01 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added a reviewer: kadircet. Herald added subscribers: usaxena95, arphaman. kbobyrev requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. This will mark more headers that

[PATCH] D114864: [clangd] IncludeClenaer: Don't mark forward declarations of a class if it's declared in the main file

2021-12-01 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 390999. kbobyrev marked an inline comment as done. kbobyrev added a comment. Resolve review comments, add justification in tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114864/new/ https://reviews.llvm.

[PATCH] D114864: [clangd] IncludeClenaer: Don't mark forward declarations of a class if it's declared in the main file

2021-12-02 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 391249. kbobyrev marked 2 inline comments as done. kbobyrev added a comment. Address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114864/new/ https://reviews.llvm.org/D114864 Files: clang-t

[PATCH] D114864: [clangd] IncludeClenaer: Don't mark forward declarations of a class if it's declared in the main file

2021-12-02 Thread Kirill Bobyrev 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 rGd3a4ef35685c: [clangd] IncludeClenaer: Don't mark forward declarations of a class if it's… (authored by kbobyrev). Repository: rG LLVM Github Mono

[PATCH] D113896: [clangd] cleanup of header guard names

2021-12-02 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/PathMapping.h:2 +#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_PATHMAPPING_H +#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_PATHMAPPING_H + Please move the header guard after the comment like we do in the other

[PATCH] D112707: [clangd] IncludeCleaner: Be more conservative in marking RecordDecl usage

2021-12-02 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. @sammccall There is one part of your comment that I couldn't understand, could you please clarify what you mean bi this? > we can't skip based on a definition (main file or class) that can't stand > alone, usually because of qualifiers. e.g. void foo::bar() {}. FWIW

[PATCH] D114949: [clangd] IncludeCleaner: Do not require forward declarations of RecordDecls when definition is available

2021-12-02 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added a reviewer: kadircet. Herald added subscribers: usaxena95, arphaman. kbobyrev requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. This makes IncludeCleaner more u

[PATCH] D112707: [clangd] IncludeCleaner: Be more conservative in marking RecordDecl usage

2021-12-02 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. In D112707#3166703 , @sammccall wrote: > In D112707#3166535 , @kbobyrev > wrote: > >> @sammccall >> >> There is one part of your comment that I couldn't understand, could you >> please

[PATCH] D113896: [clangd] cleanup of header guard names

2021-12-02 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. Also, please mention the In D113896#3166732 , @kuhnel wrote: > @kadircet looks like clang-tidy does not detect missing comments in `#endif`. > It does complain about missing comments for namespaces. E.g. in > `Serialization.h`

[PATCH] D113898: [NFC][clangd] cleaning up llvm-qualified-auto

2021-12-02 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. In D113898#3167050 , @kuhnel wrote: > Looking at the documentation, this looks like a bug in the clang-tidy check: > https://releases.llvm.org/13.0.0/tools/clang/tools/extra/docs/clang-tidy/checks/readability-qualified-auto.html

[PATCH] D114949: [clangd] IncludeCleaner: Do not require forward declarations of RecordDecls when definition is available

2021-12-02 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 391393. kbobyrev marked 2 inline comments as done. kbobyrev added a comment. Resolve review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114949/new/ https://reviews.llvm.org/D114949 Files: clang-

[PATCH] D114949: [clangd] IncludeCleaner: Do not require forward declarations of RecordDecls when definition is available

2021-12-03 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. In D114949#3169074 , @kadircet wrote: > thanks! Aww, sorry, I capitalized/reformatted parts of them but missed the rest :D Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114949/new

[PATCH] D114949: [clangd] IncludeCleaner: Do not require forward declarations of RecordDecls when definition is available

2021-12-03 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 391566. kbobyrev added a comment. Fix typos. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114949/new/ https://reviews.llvm.org/D114949 Files: clang-tools-extra/clangd/IncludeCleaner.cpp clang-tools-extra

[PATCH] D114949: [clangd] IncludeCleaner: Do not require forward declarations of RecordDecls when definition is available

2021-12-03 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 391567. kbobyrev marked an inline comment as done. kbobyrev added a comment. Improve wording. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114949/new/ https://reviews.llvm.org/D114949 Files: clang-tools-ex

[PATCH] D114949: [clangd] IncludeCleaner: Do not require forward declarations of RecordDecls when definition is available

2021-12-03 Thread Kirill Bobyrev 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 rGbab7a30ab692: [clangd] IncludeCleaner: Do not require forward declarations of RecordDecls… (authored by kbobyrev). Repository: rG LLVM Github Mono

[PATCH] D76595: [clangd-vscode] NFC; Improve wording in documentation and update VSCode tasks

2020-03-23 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added a reviewer: hokein. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. VSCode tasks are updated to the latest supported versions: deprecated values are removed and rep

[PATCH] D76595: [clangd-vscode] NFC; Improve wording in documentation and update VSCode tasks

2020-03-24 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. In D76595#1936408 , @hokein wrote: > thanks. regarding files in `.vscode`, I think they are just local configs in > VSCode, we can probably remove the whole directory from git since we already > ignore them in the `llvm/.gitigno

[PATCH] D76595: [clangd-vscode] NFC; Improve wording in documentation and update VSCode tasks

2020-04-01 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdb3d64eebbe0: [clangd-vscode] NFC; Improve wording in documentation and update VSCode tasks (authored by kbobyrev). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D74606: [clangd] Add add commit characters to the server capabilities

2020-02-18 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 245331. kbobyrev added a comment. Add pipe and single quote to commit characters. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74606/new/ https://reviews.llvm.org/D74606 Files: clang-tools-extra/clangd/Cla

[PATCH] D74606: [clangd] Add add commit characters to the server capabilities

2020-02-18 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2a095ff6f502: [clangd] Add add commit characters to the server capabilities (authored by kbobyrev). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74606/new/

[PATCH] D74709: [clangd] Allow renaming class templates in cross-file rename.

2020-02-19 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. I think we might still give a warning of some sort that this is known to produce results that are not always correct. Otherwise it might feel like a bug/unknown behavior. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7470

[PATCH] D74829: [clang-rename] Add the USR of incomplete decl to the USRSet.

2020-02-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev accepted this revision. kbobyrev added a comment. This revision is now accepted and ready to land. Let me try to reproduce it in Clang-Rename. If I don't respond by tomorrow, feel free to submit the patch. Comment at: clang/lib/Tooling/Refactoring/Rename/USRFindingAct

[PATCH] D74709: [clangd] Allow renaming class templates in cross-file rename.

2020-02-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev accepted this revision. kbobyrev added a comment. This revision is now accepted and ready to land. Okay, that is unfortunate, but I think trying to rename these classes with some inaccuracy is better than failing right away. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

[PATCH] D74961: [clangd] Make global rename file limit adjustable

2020-02-21 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added a reviewer: hokein. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D74961 Files: clang-tools-ext

[PATCH] D74829: [clang-rename] Add the USR of incomplete decl to the USRSet.

2020-02-21 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. Yeah, it works in Clang-Rename due to additional steps in the renaming process. Testing only Clangd's rename is sufficient here. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74829/new/ https://reviews.llvm.org/D74829

[PATCH] D74961: [clangd] Make global rename file limit adjustable

2020-02-24 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev abandoned this revision. kbobyrev added a comment. In D74961#1886479 , @hokein wrote: > oops, I should have synced with you first (the task was assigned to me in the > Tuesday meeting), I have https://reviews.llvm.org/D74834 which is under > rev

[PATCH] D75251: [clangd] Move the format rename edits from clangdserver to rename API, NFC.

2020-02-28 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev accepted this revision. kbobyrev added a comment. This revision is now accepted and ready to land. LGTM with few nits Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:466 +llvm::Expected formatEdits(FileEdits FE, + const f

[PATCH] D75604: [clangd] Round WorkDoneProgressBegin.percentage down

2020-03-04 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. kbobyrev updated this revision to Diff 248164. kbobyrev added a comment. %s/ceil/floor/g Wh

[PATCH] D75604: [clangd] Round WorkDoneProgressBegin.percentage down

2020-03-04 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 248164. kbobyrev added a comment. %s/ceil/floor/g Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75604/new/ https://reviews.llvm.org/D75604 Files: clang-tools-extra/clangd/ClangdLSPServer.cpp Index: clang-

[PATCH] D75604: [clangd] Round WorkDoneProgressBegin.percentage down

2020-03-05 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev abandoned this revision. kbobyrev marked an inline comment as done. kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:1409 (Stats.Enqueued - Stats.LastIdle); + // Round down to 2 decimal places for re

[PATCH] D70445: [clangd] Show lambda signature for lambda autocompletions

2019-11-19 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added a reviewer: sammccall. kbobyrev added projects: clang, clang-tools-extra. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay. The original bug report can be found here .

[PATCH] D70445: [clangd] Show lambda signature for lambda autocompletions

2019-11-21 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 230387. kbobyrev marked 12 inline comments as done. kbobyrev added a comment. Add initial support for generic lambdas, put more tests into `clang/test/CodeCompletion`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70445/new/ https://reviews.llvm.o

[PATCH] D70445: [clangd] Show lambda signature for lambda autocompletions

2019-11-21 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang/lib/Sema/SemaCodeComplete.cpp:3335 +return nullptr; + const auto *LambdaType = VD->getType().getTypePtr(); + if (const auto *SugaredType = dyn_cast(LambdaType)) sammccall wrote: > VD->getType()->getAsCXXReco

[PATCH] D70528: [NFC] ASSERT_EQ before accessing items in containers

2019-11-21 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added a reviewer: ilya-biryukov. kbobyrev added a project: clang-tools-extra. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous. Herald added a project: clang. As discussed offline, `ASSERT_EQ` should be used to check if the cont

[PATCH] D70528: [NFC] ASSERT_EQ before accessing items in containers

2019-11-21 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 230412. kbobyrev marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70528/new/ https://reviews.llvm.org/D70528 Files: clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp clang-tools-extra/clangd/unittests/Diagno

[PATCH] D70528: [NFC] ASSERT_EQ before accessing items in containers

2019-11-21 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 230416. kbobyrev marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70528/new/ https://reviews.llvm.org/D70528 Files: clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp clang-tools-extra/clangd/unittests/Diagno

[PATCH] D70528: [NFC] ASSERT_EQ before accessing items in containers

2019-11-21 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 230417. kbobyrev marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70528/new/ https://reviews.llvm.org/D70528 Files: clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp clang-tools-extra/clangd/unittests/Diagno

[PATCH] D70445: [clangd] Show lambda signature for lambda autocompletions

2019-11-21 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang/lib/Sema/SemaCodeComplete.cpp:3398 + // parameters. + auto AddTemplatedFunctionTypeAndResult = [&](const FunctionTemplateDecl + *FunTmpl) { sammccall wrote: > I

[PATCH] D70445: [clangd] Show lambda signature for lambda autocompletions

2019-11-21 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 230594. kbobyrev marked 7 inline comments as done. kbobyrev added a comment. Simplified the patch to address the comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70445/new/ https://reviews.llvm.org/D70445 Files: clang-tools-extra/clangd/u

[PATCH] D70445: [clangd] Show lambda signature for lambda autocompletions

2019-11-22 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 230619. kbobyrev added a comment. Get rid of incomplete identifiers in test code. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70445/new/ https://reviews.llvm.org/D70445 Files: clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp clang/li

[PATCH] D70445: [clangd] Show lambda signature for lambda autocompletions

2019-11-22 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7f0dcf665dd2: [clangd] Show lambda signature for lambda autocompletions (authored by kbobyrev). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70445/new/ htt

[PATCH] D70528: [NFC] ASSERT_EQ before accessing items in containers

2019-11-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 231046. kbobyrev added a comment. Rebase on top of master. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70528/new/ https://reviews.llvm.org/D70528 Files: clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp clang-tools-extra/clangd/unitte

[PATCH] D70528: [NFC] ASSERT_EQ before accessing items in containers

2019-11-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc547c22f1897: [NFC] ASSERT_EQ before accessing items in containers (authored by kbobyrev). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70528/new/ https://

[PATCH] D70832: [clangd] Log cc1 args at verbose level.

2019-11-29 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. Sorry, seems I was too late :( Comment at: clang-tools-extra/clangd/TUScheduler.cpp:412 std::unique_ptr Invocation = buildCompilerInvocation(Inputs, CompilerInvocationDiagConsumer); +// Log cc1 args even (especially!) if creating invo

[PATCH] D70863: [clangd] Try harder to find a plausible `clang` as argv0, particularly on Mac.

2019-12-02 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. The current version of the patch fixes one of the related issues. When running on a simple file like this #include int main() { std::cout << "Hello, world" << std::endl; return 0; } Clangd would fail to find `iostream` header and produce e

[PATCH] D70863: [clangd] Try harder to find a plausible `clang` as argv0, particularly on Mac.

2019-12-02 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev accepted this revision. kbobyrev added a comment. In D70863#1764977 , @sammccall wrote: > @kbobyrev would you mind testing this again? > > Dropping an empty compile_flags.txt should also work (and test the other > codepath) I've tested again (a

[PATCH] D70943: [NFC] Slightly improve wording in the comments

2019-12-03 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9091f06994f0: [NFC] Slightly improve wording in the comments (authored by kbobyrev). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D71029: [clangd] (take 2) Try harder to find a plausible `clang` as argv0, particularly on Mac.

2019-12-05 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. In D71029#1769416 , @sammccall wrote: > @kbobyrev would you mind verifying this version of the patch also works? > I don't expect changes vs the last one: it's been restructured a lot but the > logic should be the same. I can

[PATCH] D71247: [clangd] Rename constructors and destructors in cross-file case

2019-12-10 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 233037. kbobyrev added a comment. Improve wording in the comment I moved. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71247/new/ https://reviews.llvm.org/D71247 Files: clang-tools-extra/clangd/refactor/Rename.cpp clang-tools-extra/clangd/uni

[PATCH] D71247: [clangd] Rename constructors and destructors in cross-file case

2019-12-10 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 233048. kbobyrev marked an inline comment as done. kbobyrev added a comment. Add another test for `~^Foo` and rebase on top of master. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71247/new/ https://reviews.llvm.org/D71247 Files: clang-tools-ex

[PATCH] D71247: [clangd] Rename constructors and destructors in cross-file case

2019-12-11 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev planned changes to this revision. kbobyrev added a comment. Need to address the comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71247/new/ https://reviews.llvm.org/D71247 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[PATCH] D71356: [Tooling/Syntax] Helpers to find spelled tokens touching a location.

2019-12-11 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang/include/clang/Tooling/Syntax/Tokens.h:320 +const syntax::Token * +spelledIdentifierTouching(SourceLocation Loc, + const syntax::TokenBuffer &Tokens); Maybe `llvm::Optional<>` here? =

[PATCH] D71247: [clangd] Rename constructors and destructors in cross-file case

2019-12-11 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 233381. kbobyrev marked an inline comment as done. kbobyrev added a comment. Address the comments and simplify the code. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71247/new/ https://reviews.llvm.org/D71247 Files: clang-tools-extra/clangd/ref

[PATCH] D71247: [clangd] Rename constructors and destructors in cross-file case

2019-12-12 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:91 + DeclRelation::Alias | DeclRelation::TemplatePattern)) { +// If the cursor is at the underlying CXXRecordDecl of the +// ClassTemplateDecl, ND will be the CXXReco

[PATCH] D71356: [Tooling/Syntax] Helpers to find spelled tokens touching a location.

2019-12-12 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev marked an inline comment as done. kbobyrev added inline comments. Comment at: clang/include/clang/Tooling/Syntax/Tokens.h:320 +const syntax::Token * +spelledIdentifierTouching(SourceLocation Loc, + const syntax::TokenBuffer &Tokens);

[PATCH] D71247: [clangd] Rename constructors and destructors in cross-file case

2019-12-12 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 233533. kbobyrev marked 5 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71247/new/ https://reviews.llvm.org/D71247 Files: clang-tools-extra/clangd/refactor/Rename.cpp clang-tools-extra/clangd/unittests/RenameTests.cpp I

[PATCH] D71356: [Tooling/Syntax] Helpers to find spelled tokens touching a location.

2019-12-12 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang/lib/Tooling/Syntax/Tokens.cpp:260 + All, [&](const syntax::Token &Tok) { return Tok.location() < Loc; }); + bool AcceptRight = Right != All.end() && !(Loc < Right->location()); + bool AcceptLeft = Right != All.begin() && !(

[PATCH] D71356: [Tooling/Syntax] Helpers to find spelled tokens touching a location.

2019-12-12 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang/lib/Tooling/Syntax/Tokens.cpp:270 + for (const syntax::Token &Tok : spelledTokensTouching(Loc, Tokens)) +if (Tok.kind() == tok::identifier) + return &Tok; ilya-biryukov wrote: > sammccall wrote: > > ilya

<    8   9   10   11   12   13   14   15   >