[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 233563. kbobyrev marked 3 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] 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 233571. kbobyrev marked 4 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] D71247: [clangd] Rename constructors and destructors in cross-file case

2019-12-12 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGec618826dfb9: [clangd] Rename constructors and destructors in cross-file case (authored by kbobyrev). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION http

[PATCH] D71455: [NFC] Fix typos in Clangd and Clang

2019-12-13 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added a reviewer: sammccall. Herald added subscribers: usaxena95, kadircet, arphaman, jkorous, MaskRay, javed.absar, ilya-biryukov. https://reviews.llvm.org/D71455 Files: clang-tools-extra/clangd/AST.cpp clang-tools-extra/clangd/ClangdServer.cpp cla

[PATCH] D71455: [NFC] Fix typos in Clangd and Clang

2019-12-16 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 234001. kbobyrev added a comment. Rebase on top of master, fix the build and apply formatting. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71455/new/ https://reviews.llvm.org/D71455 Files: clang-tools-extra/clangd/AST.cpp clang-tools-extra/c

[PATCH] D71455: [NFC] Fix typos in Clangd and Clang

2019-12-16 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3b9715cb2193: [NFC] Fix typos in Clangd and Clang (authored by kbobyrev). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71455/

[PATCH] D71455: [NFC] Fix typos in Clangd and Clang

2019-12-17 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. In D71455#1787266 , @MaskRay wrote: > Renaming `handleDeclOccurence`, `handleMacroOccurence` and > `handleModuleOccurence` are definitely not NFC because they are public APIs > that can be used by downstream projects. I'm sor

[PATCH] D71598: [clangd] Filter implicit references from index while renaming

2019-12-17 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ilya-biryukov, kadircet. kbobyrev added a project: clang-tools-extra. Herald added subscribers: usaxena95, arphaman, mgrang, jkorous, MaskRay. When asked for references during cross-file rename, index might return implicit references to th

[PATCH] D71598: [clangd] Filter implicit references from index while renaming

2019-12-17 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. In D71598#1787806 , @hokein wrote: > (apologies, the FIXME may imply this approach...) > > this approach is based on an assumption: the index results are matched to the > latest file content, but this is not always true in practi

[PATCH] D71598: [clangd] Filter implicit references from index while renaming

2019-12-17 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. (also, this should eliminate unwanted changes caused by the index being stale, wouldn't it?) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71598/new/ https://reviews.llvm.org/D71598 ___ cfe-commits mailing list cf

[PATCH] D71598: [clangd] Filter implicit references from index while renaming

2019-12-19 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 234720. kbobyrev added a comment. Move helper function back to the anonymous namespace. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71598/new/ https://reviews.llvm.org/D71598 Files: clang-tools-extra/clangd/refactor/Rename.cpp clang-tools-ex

[PATCH] D71598: [clangd] Filter implicit references from index while renaming

2019-12-19 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 234719. kbobyrev marked 7 inline comments as done. kbobyrev added a comment. Sorry for a delay: I was trying to work with range patching heuristics and get it to work in generic case of "stale index returns more results than lexer", but in the end I converg

[PATCH] D71598: [clangd] Filter implicit references from index while renaming

2019-12-19 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 234727. kbobyrev marked 5 inline comments as done. kbobyrev added a comment. Addressed a bunch of comments to cleanup the patch and replied to ask for clarification of several unresolved comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71598

[PATCH] D71598: [clangd] Filter implicit references from index while renaming

2019-12-19 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:591 // Details: -// - lex the draft code to get all rename candidates, this yields a superset -//of candidates. +// - lex the draft code to get all rename candidates, this yields a set

[PATCH] D71727: [clang][Tooling] Prefer -x over -std when interpolating

2019-12-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. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71727/new/ https://reviews.llvm.org/D71727 ___

[PATCH] D71880: [clangd] Implement Decl canonicalization rules for rename

2019-12-25 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. This patch introduces new canonicalization rules which are used for AST-based rename in Clangd. By comparing two canonical declarat

[PATCH] D71880: [clangd] Implement Decl canonicalization rules for rename

2019-12-25 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev planned changes to this revision. kbobyrev added a comment. This is a WIP draft. Few items to address before pushing for a review - More tests: renaming is a complex feature and I want to make sure there are no regressions/corner-cases I did not handle. It might make sense to adopt a b

[PATCH] D72746: [clangd] Add a flag for implicit references in the Index

2020-02-03 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/index/Ref.h:32 + // + // class Foo {}; + // ^ Foo declaration hokein wrote: > could you confirm with it? this looks like a `Foo` class definition. Good point, I thought it should be bo

[PATCH] D72746: [clangd] Add a flag for implicit references in the Index

2020-02-03 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 241994. kbobyrev added a comment. Remove unnecessary include. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72746/new/ https://reviews.llvm.org/D72746 Files: clang-tools-extra/clangd/index/Ref.h clang-too

[PATCH] D72746: [clangd] Add a flag for implicit references in the Index

2020-02-03 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 241993. kbobyrev marked 14 inline comments as done. kbobyrev added a comment. Address a number of comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72746/new/ https://reviews.llvm.org/D72746 Files: cl

[PATCH] D72867: [clangd] Support renaming designated initializers

2020-02-03 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/FindTarget.cpp:639 +void VisitDesignatedInitExpr(const DesignatedInitExpr *DIE) { + for (const DesignatedInitExpr::Designator &D : DIE->designators()) { +if (!D.isFieldDesignator())

[PATCH] D72867: [clangd] Support renaming designated initializers

2020-02-03 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 242040. kbobyrev marked an inline comment as done. kbobyrev added a comment. Add tests for nested designated initializers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72867/new/ https://reviews.llvm.org/D728

[PATCH] D72746: [clangd] Add a flag for implicit references in the Index

2020-02-05 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 242577. kbobyrev marked 7 inline comments as done. kbobyrev added a comment. Address the comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72746/new/ https://reviews.llvm.org/D72746 Files: clang-tools

[PATCH] D72746: [clangd] Add a flag for implicit references in the Index

2020-02-05 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 242578. kbobyrev added a comment. Remove an artifact. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72746/new/ https://reviews.llvm.org/D72746 Files: clang-tools-extra/clangd/index/Ref.h clang-tools-extra

[PATCH] D72746: [clangd] Add a flag for implicit references in the Index

2020-02-05 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 242809. kbobyrev marked 2 inline comments as done. kbobyrev added a comment. Address another round of comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72746/new/ https://reviews.llvm.org/D72746 Files:

[PATCH] D72746: [clangd] Add a flag for spelled references in the Index

2020-02-05 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa6860c1af457: [clangd] Add a flag for spelled references in the Index (authored by kbobyrev). Changed prior to commit: https://reviews.llvm.org/D72746?vs=242809&id=242811#toc Repository: rG LLVM Gith

[PATCH] D74112: [clangd] Filter out implicit references while renaming

2020-02-06 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added a reviewer: hokein. Herald added subscribers: usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. This patch is based on D72746 and prevents non-spelled references from bei

[PATCH] D74112: [clangd] Filter out implicit references while renaming

2020-02-06 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 242822. 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/D74112/new/ https://reviews.llvm.org/D74112 Files: clang-to

[PATCH] D74112: [clangd] Filter out implicit references while renaming

2020-02-06 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG10540e480dfb: [clangd] Filter out implicit references while renaming (authored by kbobyrev). Changed prior to commit: https://reviews.llvm.org/D74112?vs=242822&id=242844#toc Repository: rG LLVM Githu

[PATCH] D74125: [clangd] Set "spelled" flag for constructor references.

2020-02-06 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev accepted this revision. kbobyrev added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/index/SymbolCollector.cpp:595 DeclarationName Name = DeclAndRef.first->getDeclName(); -bool Spelled = Identifier

[PATCH] D72867: [clangd] Support renaming designated initializers

2020-02-10 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9f6d8de28ab6: [clangd] Support renaming designated initializers (authored by kbobyrev). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72867/new/ https://rev

[PATCH] D74216: [clang-rename] Fix the missing template constructors.

2020-02-10 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/unittests/RenameTests.cpp:144 + template + [[Foo]](); + nit: Maybe also add `^` to this one and the one below? Comment at: clang/lib/Tooling/Refactoring/Rena

[PATCH] D74216: [clang-rename] Fix the missing template constructors.

2020-02-11 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. Should be good to go, please run `git-clang-format` on the changes just to make sure. Thanks for fixing this! Comment at: clang-tools-extra/clangd/unittests/RenameTests

[PATCH] D71110: [clangd] A tool to evaluate cross-file rename.

2020-02-11 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. Thanks! Now I can build it. I was able to get some rename failures through this tool, though :( I had to disable the check for number of affected files first, but then this seems to be problematic: llvm/include/llvm/ADT/ArrayRef.h llvm::ArrayRef clangd llvm/includ

[PATCH] D71110: [clangd] A tool to evaluate cross-file rename.

2020-02-12 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. Renaming `llvm::Optional` also fails (clangd-rename says the symbol is not of a supported kind even though it's a class). Renaming `llvm::None` is also not working: there seem to be many problems but a lot of them are connected with function's argument default values (

[PATCH] D71110: [clangd] A tool to evaluate cross-file rename.

2020-02-12 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. In D71110#1871896 , @hokein wrote: > Thanks for the feedback! > > Yeah, currently template classes are not supported in cross-file rename, see > https://github.com/llvm/llvm-project/blob/master/clang-tools-extra/clangd/refactor/R

[PATCH] D74411: [clangd] Query constructors in the index during rename.

2020-02-12 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:326 + // When querying references for a class, clangd's own index will also return + // references of the corresponding class constructors, but this is not true + // for all index backends

[PATCH] D74411: [clangd] Query constructors in the index during rename.

2020-02-13 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. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74411/new/ https://reviews.llvm.org/D74411

[PATCH] D74395: [clangd] Add tracer to the rename workflow, NFC

2020-02-13 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:345 + +SPAN_ATTACH(Tracer, FileAndOccurrences.first(), +static_cast(Ranges.size())); A tracer message here would be helpful! Comment at

[PATCH] D74547: [clangd] Expose Code Completion score to the client

2020-02-13 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. Make it possible for the client to adjust the ranking by using the score Clangd calculates fo

[PATCH] D74547: [clangd] Expose Code Completion score to the client

2020-02-13 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 244402. kbobyrev added a comment. Replace actual scores with regex for stability. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74547/new/ https://reviews.llvm.org/D74547 Files: clang-tools-extra/clangd/Cod

[PATCH] D74547: [clangd] Expose Code Completion score to the client

2020-02-13 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 244403. kbobyrev added a comment. Replace one instance of hardcoded score missed in the previous update. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74547/new/ https://reviews.llvm.org/D74547 Files: clang

[PATCH] D74547: [clangd] Expose Code Completion score to the client

2020-02-13 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 244412. kbobyrev marked 3 inline comments as done. kbobyrev added a comment. Make a note that score is Clangd extension. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74547/new/ https://reviews.llvm.org/D74547

[PATCH] D74547: [clangd] Expose Code Completion score to the client

2020-02-13 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGff7b5bac04fa: [clangd] Expose Code Completion score to the client (authored by kbobyrev). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74547/new/ https://r

[PATCH] D74555: [clangd] Add a flag for setting isIncomplete flag true in all responses

2020-02-13 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. To simplify re-ranking the code completion results, some clients might want to mimic receivin

[PATCH] D74395: [clangd] Add tracer to the rename workflow, NFC

2020-02-14 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev accepted this revision. kbobyrev added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:345 + +SPAN_ATTACH(Tracer, FileAndOccurrences.first(), +static_cast(Ranges.size()));

[PATCH] D74555: [clangd] Add a flag for setting isIncomplete flag true in all responses

2020-02-14 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 244618. kbobyrev marked 2 inline comments as done. kbobyrev added a comment. Address the review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74555/new/ https://reviews.llvm.org/D74555 Files: clan

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

2020-02-14 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. Make it more convinient for the clients to select completion items by providing a set of defa

[PATCH] D74555: [clangd] Add a flag for setting isIncomplete flag true in all responses

2020-02-14 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev abandoned this revision. kbobyrev added a comment. Okay, makes sense! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74555/new/ https://reviews.llvm.org/D74555 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[PATCH] D72638: [clangd] Fix rename for explicit destructor calls

2020-01-16 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev planned changes to this revision. kbobyrev added a comment. Going to investigate few interesting cases of `findExplicitReferences` not working as intended and opting out for a clean approach that prevents duplicates from getting into the reference set. Comment at: cl

[PATCH] D72638: [clangd] Fix rename for explicit destructor calls

2020-01-16 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 238541. kbobyrev added a comment. Avoid duplicate references by filtering out destructor calls Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72638/new/ https://reviews.llvm.org/D72638 Files: clang-tools-ext

[PATCH] D72638: [clangd] Fix rename for explicit destructor calls

2020-01-16 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev marked 3 inline comments as done. kbobyrev added a comment. The patch should probably be correct now. I've submitted the issue I encountered while trying to add more tests for this patch since it seems to be a separate issue (hopefully, I'm doing everything correctly while setting up t

[PATCH] D72867: [clangd] Support renaming designated initializers

2020-01-16 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added a reviewer: sammccall. Herald added subscribers: usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. kbobyrev updated this revision to Diff 238586. kbobyrev added a comment. Remove duplicated testt Clangd

[PATCH] D72867: [clangd] Support renaming designated initializers

2020-01-16 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 238586. kbobyrev added a comment. Remove duplicated testt Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72867/new/ https://reviews.llvm.org/D72867 Files: clang-tools-extra/clangd/FindTarget.cpp clang-tool

[PATCH] D72746: [clangd] Add a flag for implicit references in the Index

2020-01-17 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/index/Ref.h:36 + // one below. + Implicit = 1 << 3, + All = Declaration | Definition | Reference | Implicit, kadircet wrote: > kadircet wrote: > > instead of doing that, could we rather de-co

[PATCH] D72746: [clangd] Add a flag for implicit references in the Index

2020-01-17 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 238786. kbobyrev marked 4 inline comments as done. kbobyrev added a comment. Address alsmost all comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72746/new/ https://reviews.llvm.org/D72746 Files: cla

[PATCH] D72746: [clangd] Add a flag for implicit references in the Index

2020-01-17 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev planned changes to this revision. kbobyrev added a comment. Need to make use of the `TokenBuffer`, ran into some difficulties when lexing some files and triggering assertions in the process. Will figure it out and update the patch. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D72638: [clangd] Fix rename for explicit destructor calls

2020-01-17 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/unittests/FindTargetTests.cpp:882 "10: targets = {ns}\n"}, + // CXX Constructor, destructor and operators. + {R"cpp( hokein wrote: > could we simplify the newly-added test?

[PATCH] D72638: [clangd] Fix rename for explicit destructor calls

2020-01-17 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 238791. kbobyrev marked 5 inline comments as done. kbobyrev added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72638/new/ https://reviews.llvm.org/D72638 Files: clang-tools-extr

[PATCH] D72746: [clangd] Add a flag for implicit references in the Index

2020-01-17 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 238902. kbobyrev added a comment. I started using TokenBuffer, but I ran into the following issue: when I'm creating `TokenBuffer` and `TokenCollector`, they do not contain any tokens. `Preprocessor` does not seem to have a non-null Lexer instance, `TokenWatc

[PATCH] D73056: [clangd] Fix DocumentOutline for concepts

2020-01-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. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73056/new/ https://reviews.llvm.org/D73056 ___

[PATCH] D72638: [clangd] Fix rename for explicit destructor calls

2020-01-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 239182. kbobyrev marked 2 inline comments as done. kbobyrev added a comment. Modify the test to address the comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72638/new/ https://reviews.llvm.org/D72638 F

[PATCH] D72638: [clangd] Fix rename for explicit destructor calls

2020-01-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/unittests/FindTargetTests.cpp:905 + public: + ~$1^Foo() {} + kadircet wrote: > this actually looks troublesome, since we are not returning the functiondecl > anymo

[PATCH] D72638: [clangd] Fix rename for explicit destructor calls

2020-01-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG38bdb94120b7: [clangd] Fix rename for explicit destructor calls (authored by kbobyrev). Changed prior to commit: https://reviews.llvm.org/D72638?vs=239182&id=239227#toc Repository: rG LLVM Github Mon

[PATCH] D73088: [clangd] Capture the missing injected class names in findExplicitReferences.

2020-01-21 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. It would also be great to have the original rename test from the linked issue since something might potentially go wrong in-between `findExplicitReferences` and rename action (and also to expand the testset because the existing one is not really extensive :(). Reposi

[PATCH] D72746: [clangd] Add a flag for implicit references in the Index

2020-01-22 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 239498. kbobyrev added a comment. Address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72746/new/ https://reviews.llvm.org/D72746 Files: clang-tools-extra/clangd/index/Ref.h clang-tools-e

[PATCH] D72746: [clangd] Add a flag for implicit references in the Index

2020-01-22 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev planned changes to this revision. kbobyrev added a comment. Will put a TODO and revert helpers back to use plain binary search over the tokens. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72746/new/ https://reviews.llvm.org/D72746 __

[PATCH] D72746: [clangd] Add a flag for implicit references in the Index

2020-01-22 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 239502. kbobyrev added a comment. Actually, this approach might be more generic (i.e. not relying on implementation too much). Added the FIXME. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72746/new/ https://

[PATCH] D72746: [clangd] Add a flag for implicit references in the Index

2020-01-22 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 239503. kbobyrev added a comment. Move added rename unit test to the end of the list. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72746/new/ https://reviews.llvm.org/D72746 Files: clang-tools-extra/clangd

[PATCH] D72746: [clangd] Add a flag for implicit references in the Index

2020-01-22 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 239544. kbobyrev marked 7 inline comments as done. kbobyrev added a comment. Address review comments, add implicit references filter for SymbolCollector, test changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D72746: [clangd] Add a flag for implicit references in the Index

2020-01-22 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/index/SymbolCollector.cpp:599 +const auto Tokens = FilesToTokensCache[MainFileID]; +for (auto &DeclAndRef : DeclRefs) { + if (auto ID = getSymbolID(DeclAndRef.first)) { hokein wrote

[PATCH] D72746: [clangd] Add a flag for implicit references in the Index

2020-01-22 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 239545. kbobyrev added a comment. Attempt to drop collected reference before doing more computation to improve performance. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72746/new/ https://reviews.llvm.org/D72

[PATCH] D72867: [clangd] Support renaming designated initializers

2020-01-23 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev planned changes to this revision. kbobyrev marked an inline comment as done. kbobyrev added a comment. Going to deal with nested designated inits soon and update the patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72867/new/ https://r

[PATCH] D148439: [clang-rename] Exit gracefully when no input provided

2023-04-16 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 Comment at: clang/tools/clang-rename/ClangRename.cpp:130 + } else { +errs() << "clang-rename: No input provided.\n"; +return 1; Probably so

[PATCH] D148439: [clang-rename] Exit gracefully when no input provided

2023-04-16 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. Oh, wait, I'm sorry, I didn't look into it closely :( Yeah, the `Input` file is not really needed, most of the time the users of `clang-rename` (not sure there are many with `clangd` being developed) use CLI flags for that. It's better to revert this patch. My bad, sho

[PATCH] D148439: [clang-rename] Exit gracefully when no input provided

2023-05-17 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. Sounds good, thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148439/new/ https://reviews.llvm.org/D148439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[PATCH] D148439: [clang-rename] Exit gracefully when no input provided

2023-04-18 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev requested changes to this revision. kbobyrev added a comment. This revision now requires changes to proceed. Yeah, this should be a right approach! Thanks! Comment at: clang/test/clang-rename/NonExistFile.cpp:1 +// RUN: not clang-rename -offset=0 -new-name=plop asdasd

[PATCH] D148439: [clang-rename] Exit gracefully when no input provided

2023-04-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. Thanks Aaron! Yes, fair enough, that looks good to me, probably no need to move a sanity check to the front of `main()` in this case. Also, just as a note: I don't know how many people use `clang-rename` anymore (especially with `clangd` being present), I rewrote a lo

[PATCH] D148439: [clang-rename] Exit gracefully when no input provided

2023-04-27 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. The difference is that `clang-rename` is a stand-alone binary with CLI whereas `clangd` isn't typically used as such (it can be, but it's a weird use-case). I don't know if there are any existing users out there, if there are then I assume there are very few. It was c

[PATCH] D117491: [clangd] Remove redundant check for renamed symbol origin

2022-01-18 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2d9198cec994: [clangd] Remove redundant check for renamed symbol origin (authored by kbobyrev). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117491/new/ ht

[PATCH] D118245: [clang][DeclPrinter] Fix printing for noexcept expressions

2022-01-26 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! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118245/new/ https://reviews.llvm.org/D118245

[PATCH] D118247: [clang] NFC: Use flush() idiomatically

2022-01-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added a reviewer: kadircet. kbobyrev requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Using both `raw_ostream::flush()` and `raw_ostream::str()` consecutively is redundant. The alternatives are: - Us

[PATCH] D118247: [clang] NFC: Use flush() idiomatically

2022-01-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 rGa2fe81f32c3a: [clang] NFC: Use flush() idiomatically (authored by kbobyrev). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION http

[PATCH] D118592: [cte] Add release notes for clangd-14

2022-01-31 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. Thanks for taking care of this! Comment at: clang-tools-extra/docs/ReleaseNotes.rst:54 + +- Diagnostics and fixes for unused include directives, according to IWYU style.

[PATCH] D117461: [clangd] IncludeCleaner: Attach "insert prgama keep" fix-it to diagnostic

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

[PATCH] D120306: [clangd] IncludeCleaner: Add support for IWYU pragma private

2022-02-22 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] D120306: [clangd] IncludeCleaner: Add support for IWYU pragma private

2022-02-22 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev planned changes to this revision. kbobyrev added a comment. The patch is working but I didn't add tests yet. Also, I think I should move the suffix mapping to `CanonicalIncludes` structure rather than `Headers`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:/

[PATCH] D120306: [clangd] IncludeCleaner: Add support for IWYU pragma private

2022-02-22 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. In D120306#3337212 , @sammccall wrote: > What's the policy this patch intends to implement? > > I'm a little concerned by building up maps of filenames with segment limits - > it looks like some kind of heuristic/partial matchin

[PATCH] D120306: [clangd] IncludeCleaner: Add support for IWYU pragma private

2022-02-22 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 410490. kbobyrev added a comment. Move suffix map to CanonicalIncludes (where it logically belongs), remove component limit there. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120306/new/ https://reviews.llvm

[PATCH] D120306: [clangd] IncludeCleaner: Add support for IWYU pragma private

2022-02-22 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. In D120306#3337374 , @sammccall wrote: > In D120306#3337288 , @kbobyrev > wrote: > >> In D120306#3337212 , @sammccall >> wrote: >> >>> What's t

[PATCH] D119842: [clangd] NFC: Cleanup IncludeCleaner API

2022-03-08 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd5106c8f973b: [clangd] NFC: Cleanup IncludeCleaner API (authored by kbobyrev). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119842/new/ https://reviews.llv

[PATCH] D101516: Introduce clangd-server-monitor tool

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

[PATCH] D101516: Introduce clangd-server-monitor tool

2021-04-30 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 341922. 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/D101516/new/ https://reviews.llvm.org/D101516 Files: clang-

[PATCH] D101516: Introduce clangd-server-monitor tool

2021-04-30 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 341925. kbobyrev added a comment. Inline gRPC deadline. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101516/new/ https://reviews.llvm.org/D101516 Files: clang-tools-extra/clangd/index/remote/CMakeLists.txt

[PATCH] D101516: Introduce clangd-server-monitor tool

2021-05-04 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 342688. 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/D101516/new/ https://reviews.llvm.org/D101516 Files: clang-t

[PATCH] D101516: Introduce clangd-server-monitor tool

2021-05-04 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 342689. kbobyrev added a comment. Remove (now) unused Python JSON import. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101516/new/ https://reviews.llvm.org/D101516 Files: clang-tools-extra/clangd/index/rem

[PATCH] D101516: Introduce clangd-server-monitor tool

2021-05-04 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 342692. kbobyrev marked 3 inline comments as done. kbobyrev added a comment. Resolve post-LGTM comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101516/new/ https://reviews.llvm.org/D101516 Files: cla

[PATCH] D101516: Introduce clangd-server-monitor tool

2021-05-04 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 342693. kbobyrev added a comment. Remove leftover --with-monitor from the lit test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101516/new/ https://reviews.llvm.org/D101516 Files: clang-tools-extra/clangd

[PATCH] D101516: Introduce clangd-server-monitor tool

2021-05-04 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 rG34593ae9982a: Introduce clangd-server-monitor tool (authored by kbobyrev). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[PATCH] D101902: [clangd] Split CC and refs limit and increase refs limit to 1000

2021-05-05 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: kadircet, nridge. 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. Related discussion: https

<    9   10   11   12   13   14   15   >