[PATCH] D72498: [clangd] Print underlying type for decltypes in hover

2020-01-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Fixes https://github.com/clangd/clangd/issues/249 Repository: rG LLVM Github Monorepo https://revi

[PATCH] D72500: [clangd] Show hower info for expressions

2020-01-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. This currently populates only the Name with the expression's type and Value if expression is evaluatabl

[PATCH] D72498: [clangd] Print underlying type for decltypes in hover

2020-01-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 237284. kadircet marked an inline comment as done. kadircet added a comment. - Update comment - Iteratively resolve underlying decltypes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72498/new/ https://review

[PATCH] D72498: [clangd] Print underlying type for decltypes in hover

2020-01-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked an inline comment as not done. kadircet added a comment. In D72498#1813899 , @ilya-biryukov wrote: > This does not work for more complicated types, though? > E.g. `decltype(a+b)* a` or `vector a`? yes, and I think we should have a more

[PATCH] D72494: [clangd] Fix targetDecl() on certain usage of ObjC properties.

2020-01-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. LGTM, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72494/new/ https://reviews.llvm.org/D72494 ___ cfe-commits mailing list cfe-commit

[PATCH] D72594: [clangd] Include expression in DecltypeTypeLoc sourcerange while building SelectionTree

2020-01-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Currently AST only contains the location for `decltype` keyword, therefore we were skipping expressions

[PATCH] D72498: [clangd] Print underlying type for decltypes in hover

2020-01-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D72498#1813989 , @ilya-biryukov wrote: > In D72498#1813962 , @sammccall wrote: > > > It's particularly unclear to me why typeprinter descends into auto but > > prints decltype, but Kad

[PATCH] D72500: [clangd] Show hower info for expressions

2020-01-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D72500#1813975 , @sammccall wrote: > Basing this on the hover for the type doesn't seem right. e.g. `int` should > be the `Type` rather than the `Name`. > > Rather than printing the value if evaluable, I think we should only s

[PATCH] D72500: [clangd] Show hower info for expressions

2020-01-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 237649. kadircet added a comment. - Ignore literals Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72500/new/ https://reviews.llvm.org/D72500 Files: clang-tools-extra/clangd/Hover.cpp clang-tools-extra/cla

[PATCH] D72498: [clangd] Print underlying type for decltypes in hover

2020-01-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D72498#1816785 , @ilya-biryukov wrote: > In D72498#1816424 , @lh123 wrote: > > > Currently, I think that in most cases, showing both expanded (canonical) > > and spelled types is suffi

[PATCH] D72500: [clangd] Show hover info for expressions

2020-01-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 237660. kadircet added a comment. - Update presentation for expressions, which doesn't have `Name` field set. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72500/new/ https://reviews.llvm.org/D72500 Files:

[PATCH] D72498: [clangd] Print underlying type for decltypes in hover

2020-01-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D72498#1817070 , @sammccall wrote: > No, I think printing *both* is at least somewhat likely to be too verbose, > especially since the previous release showed no types at all. > And we're out of time to iterate on the behavio

[PATCH] D72622: [clangd] Add a ruler after header in hover

2020-01-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D72622 Files: clang-tools-extra/clan

[PATCH] D72623: [clangd] Rearrange type, returntype and parameters in hover card

2020-01-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added reviewers: sammccall, ilya-biryukov. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay. Herald added a project: clang. Moves type/returntype into its own line as it is more readable in cases where the type is long. Also giv

[PATCH] D72625: [clangd] Render header of hover card as a heading

2020-01-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D72625 Files: clang-tools-extra/clan

[PATCH] D72625: [clangd] Render header of hover card as a heading

2020-01-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG15078d7202b4: [clangd] Render header of hover card as a heading (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72625/new/ https://rev

[PATCH] D72594: [clangd] Include expression in DecltypeTypeLoc sourcerange while building SelectionTree

2020-01-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked 3 inline comments as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/Selection.cpp:530 SourceRange S = N.getSourceRange(); +if (auto *TL = N.get()) { + // DecltypeTypeLoc only contains the SourceRange for `decltype` keyword

[PATCH] D72594: [clangd] Include expression in DecltypeTypeLoc sourcerange while building SelectionTree

2020-01-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf5465e74ef4c: [clangd] Include expression in DecltypeTypeLoc sourcerange while building… (authored by kadircet). Changed prior to commit: https://reviews.llvm.org/D72594?vs=237610&id=237743#toc Reposit

[PATCH] D72622: [clangd] Add a ruler after header in hover

2020-01-14 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 237886. kadircet marked 5 inline comments as done. kadircet added a comment. - Increase control around paddings for plaintext rendering. - Add another ruler before definition. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[PATCH] D72622: [clangd] Add a ruler after header in hover

2020-01-14 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 237887. kadircet added a comment. - Update comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72622/new/ https://reviews.llvm.org/D72622 Files: clang-tools-extra/clangd/FormattedString.cpp clang-tools

[PATCH] D72623: [clangd] Rearrange type, returntype and parameters in hover card

2020-01-14 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 237888. kadircet marked 2 inline comments as done. kadircet added a comment. - Address comments and rebase on top of ruler patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72623/new/ https://reviews.llvm.or

[PATCH] D72622: [clangd] Add a ruler after header in hover

2020-01-14 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:553 + // Put a linebreak after header to increase readability. + Output.addRuler(); sammccall wrote: > (When merging with D72623, I'm assuming return type will go below this line?)

[PATCH] D72500: [clangd] Show hover info for expressions

2020-01-14 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72500/new/ https://reviews.llvm.org/D72500 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D72623: [clangd] Rearrange type, returntype and parameters in hover card

2020-01-14 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:567 + } else if (Type) { +Output.addParagraph().appendText("Type: ").appendCode(*Type); } sammccall wrote: > consider **`∈`**, which would be short and symmetrical with the arr

[PATCH] D72622: [clangd] Add a ruler after header in hover

2020-01-14 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 237934. kadircet added a comment. - Per offline discussions, do post processing to get rid of multiple ruler occurences. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72622/new/ https://reviews.llvm.org/D7262

[PATCH] D72715: [clang][CodeComplete] Propogate printing policy to FunctionDecl

2020-01-14 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous. Herald added a project: clang. Printing policy was not propogated to functiondecls when creating a completion string which resulted in canonical template p

[PATCH] D72500: [clangd] Show hover info for expressions

2020-01-14 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 238009. kadircet marked 3 inline comments as done. kadircet added a comment. - Populate `Name` for expressions - Don't special case `StringLiteral`s Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72500/new/ htt

[PATCH] D72715: [clang][CodeComplete] Propogate printing policy to FunctionDecl

2020-01-14 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 238017. kadircet added a comment. - Upload the correct diff Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72715/new/ https://reviews.llvm.org/D72715 Files: clang-tools-extra/clangd/unittests/CodeCompleteTes

[PATCH] D72715: [clang][CodeComplete] Propogate printing policy to FunctionDecl

2020-01-14 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D72715#1819879 , @ilya-biryukov wrote: > The patch contains only tests, are we missing the actual functional change? oopsy Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72715/

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

2020-01-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/index/Ref.h:36 + // one below. + Implicit = 1 << 3, + All = Declaration | Definition | Reference | Implicit, instead of doing that, could we rather de-couple two enums completely and have a

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

2020-01-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet 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: > instead of doing that, could we rather de-couple two enums compl

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

2020-01-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/FindTarget.cpp:620 + if (llvm::dyn_cast(E->getMemberDecl())) +NameLocation = E->getEndLoc(); Refs.push_back(ReferenceLoc{E->getQualifierLoc(), instead of patching the source

[PATCH] D72500: [clangd] Show hover info for expressions

2020-01-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. kadircet marked an inline comment as done. Closed by commit rG4d14bfaa2cb1: [clangd] Show hower info for expressions (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D72500: [clangd] Show hover info for expressions

2020-01-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:519 + // + // expression : `int` // Note that we are making use of a level-3 heading because VSCode renders sammccall wrote: > nit: this is just "expression" not yet, it will be a

[PATCH] D72622: [clangd] Add a ruler after header in hover

2020-01-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 238243. kadircet marked 2 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72622/new/ https://reviews.llvm.org/D72622 Files: clang-tools-ex

[PATCH] D72623: [clangd] Rearrange type, returntype and parameters in hover card

2020-01-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG44f9c7a820c1: [clangd] Rearrange type, returntype and parameters in hover card (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72623/ne

[PATCH] D72622: [clangd] Add a ruler after header in hover

2020-01-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd74a3d470c31: [clangd] Add a ruler after header in hover (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72622/new/ https://reviews.ll

[PATCH] D72623: [clangd] Rearrange type, returntype and parameters in hover card

2020-01-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D72623#1819153 , @lh123 wrote: > I think the character "🡺" should be avoided, as it may not display properly > in some environments. I believe most of the editors should be able to display unicode characters, please let us

[PATCH] D72498: [clangd] Print underlying type for decltypes in hover

2020-01-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 238245. kadircet added a comment. - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72498/new/ https://reviews.llvm.org/D72498 Files: clang-tools-extra/clangd/Hover.cpp clang-tools-extra/clangd/unitt

[PATCH] D72623: [clangd] Rearrange type, returntype and parameters in hover card

2020-01-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 238244. kadircet marked 3 inline comments as done. kadircet added a comment. - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72623/new/ https://reviews.llvm.org/D72623 Files: clang-tools-extra/clangd

[PATCH] D72777: [clangd] Dont display `` kinds in hover board

2020-01-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: usaxena95. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Currently when hovering over an `auto` or `decltype` that resolve to a builtin-type, clangd would display `` as th

[PATCH] D72826: [clangd] Make output order of allTargetDecls deterministic

2020-01-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman, mgrang, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Makes use of insertion order to stabilize output for multiple decls. Fixes https://bugs.llvm.o

[PATCH] D72777: [clangd] Dont display `` kinds in hover board

2020-01-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb08e8353a89f: [clangd] Dont display `` kinds in hover board (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72777/new/ https:

[PATCH] D87450: [clangd] Implement hot index reloading for clangd-index-server

2020-09-11 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/index/remote/server/Server.cpp:71 std::unique_ptr openIndex(llvm::StringRef Index) { return loadIndex(Index, /*UseIndex=*/true); why do we have this extra indirection? C

[PATCH] D87501: [clangd] Track tweaks that fail the apply stage

2020-09-11 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: adamcz. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous. Herald added a project: clang. kadircet requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. Repository: rG LLVM Github Monorepo

[PATCH] D87450: [clangd] Implement hot index reloading for clangd-index-server

2020-09-14 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/index/remote/server/Server.cpp:226 + llvm::sys::TimePoint<> LastModificationTime = + std::chrono::system_clock::now(); + for (;; std::this_thread::sleep_for(std::chrono::seconds(90))) { k

[PATCH] D87501: [clangd] Track tweaks that fail the apply stage

2020-09-14 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG574dd6054717: [clangd] Track tweaks that fail the apply stage (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87501/new/ https://revie

[PATCH] D87450: [clangd] Implement hot index reloading for clangd-index-server

2020-09-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. Thanks! Mostly looks good, just couple of nits. Comment at: clang-tools-extra/clangd/index/remote/server/Server.cpp:223 +// whenever they become available. +void hotReload(clangd::SwapIndex *Index, llvm::StringRef IndexPath, + llvm::vfs::

[PATCH] D87450: [clangd] Implement hot index reloading for clangd-index-server

2020-09-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. oops, looks like i forgot to hit submit in the morning.. Comment at: clang-tools-extra/clangd/index/remote/server/Server.cpp:228 + auto Status = FS->status(IndexPath); + if (!Status || Status->equivalent(LastStatus)) +return; i b

[PATCH] D87710: [clangd] Actually parse Index section of the YAML file.

2020-09-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. oh shoot, thanks for catching this. i'll leave the stamp to sam, just came here to remind that this needs to be cherry-picked into release branch :/ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87710/new/ https://reviews

[PATCH] D87450: [clangd] Implement hot index reloading for clangd-index-server

2020-09-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/index/remote/server/Server.cpp:234 + LastStatus.getLastModificationTime(), Status->getLastModificationTime()); + std::unique_ptr NewIndex = loadIndex(IndexPath); + if (!NewIndex) { kbob

[PATCH] D87450: [clangd] Implement hot index reloading for clangd-index-server

2020-09-16 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! Comment at: clang-tools-extra/clangd/index/remote/server/Server.cpp:342 + HotReloadThread.join(); } kbobyrev wrote: > kadircet wrote: > >

[PATCH] D87256: [clangd] Avoid relations being overwritten in a header shard

2020-09-21 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/index/FileIndex.cpp:152 + // Attribute relations to both their subject's and object's locations. + // See https://github.com/clangd/clangd/issues/510 for discussion of why. if (Index.Relations) { --

[PATCH] D86077: [clangd] Add a way for exporting memory usage metrics

2020-09-21 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet planned changes to this revision. kadircet added a comment. In D86077#2281218 , @sammccall wrote: > Just for the record, as I think Kadir and Adam are both aware... > > We discussed making this a bit richer and less reliant on static state. > We'd

[PATCH] D88103: [JSON] Add error reporting facility, used in fromJSON and ObjectMapper.

2020-09-23 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! This looks great. I've mostly did the full review anyway but feel free to land in small patches just in case some compiler becomes upset and you need to revert. Mostly nits, and s

[PATCH] D88144: [clangd] Disable suffix matching fallback for C during include insertion

2020-09-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman. Herald added a project: clang. kadircet requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. Clangd currently doesn't respect language a

[PATCH] D87891: [clangd] findNearbyIdentifier(): guaranteed to give up after 2^N lines

2020-09-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. Hey! Sorry for the late reply, this has been open in my tabs since day 1 just didn't get a chance to take a look at it. The biggest problem I see is, this is not changing the fact that we are still traversing the whole file: - You do one traversal over the whole file

[PATCH] D88144: [clangd] Disable suffix matching fallback for C during include insertion

2020-09-24 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D88144#2290830 , @sammccall wrote: > (I do wonder whether it's safe to just drop the mapping table entirely now...) As discussed offline; It still helps with mapping symbols missing from our cppreference extraction back to um

[PATCH] D88144: [clangd] Disable suffix matching fallback for C during include insertion

2020-09-24 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG64168c6d996b: [clangd] Disable suffix matching fallback for C during include insertion (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D88204: [clangd] Drop path suffix mapping for std symbols

2020-09-24 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, jfb, arphaman. Herald added a project: clang. kadircet requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. As mentioned in D88144

[PATCH] D88297: [clangd] Trivial setter support when moving items to fields

2020-09-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:414 // If CMD is one of the forms: // void foo(T arg) { FieldName = arg; } // R foo(T arg) { FieldName = arg; return *this; } can you also update the docs? Co

[PATCH] D88411: [clangd] Introduce MemoryTrees

2020-09-28 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman, mgorny. Herald added a project: clang. kadircet requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. A structure that can be used to rep

[PATCH] D88413: [clangd] Add a metric for tracking memory usage

2020-09-28 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman. Herald added a project: clang. kadircet requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. Repository: rG LLVM Github Monorepo http

[PATCH] D88414: [clangd] Introduce memory dumping to FileIndex, FileSymbols and BackgroundIndex

2020-09-28 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman. Herald added a project: clang. kadircet requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. File-granular information is considered det

[PATCH] D88415: [clangd] Introduce memory usage dumping to TUScheduler, for Preambles and ASTCache

2020-09-28 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman, javed.absar. Herald added a project: clang. kadircet requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. File-granular information is c

[PATCH] D88417: [clangd] Record memory usages after each notification

2020-09-28 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. Herald added subscribers: cfe-commits, usaxena95, arphaman. Herald added a project: clang. kadircet requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. Depends on D88415 Repository: rG LLVM Githu

[PATCH] D86279: [clangd] Don't crash on `#pragma clang __debug parser_crash`

2020-08-20 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/D86279/new/ https://reviews.llvm.org/D86279

[PATCH] D87253: [libTooling] Change CDB heuristic to look further for files in a given language.

2020-09-08 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. As discussed offline, this is trading off some accuracy between getting `-I` correct vs `-std` and it is unclear whether that's beneficial or harmful. It is easy to come up with examples for both and we were split 50/50 between each. In the end all of this is a heuristi

[PATCH] D87244: [clang] Add fix-it for -Wreorder-ctor.

2020-09-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. thanks, comments around some implementations. the only high level question i have is about the choice of location for fix-it (see the detailed comment inline) Comment at: clang/lib/Sema/SemaDeclCXX.cpp:5198 +static bool RangeContainsComments(Sema &Se

[PATCH] D92494: [clangd] Bundle code completion items when the include paths differ, but resolve to the same file.

2020-12-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/CodeComplete.cpp:187 + if (auto Header = headerToInsertIfAllowed(Opts)) +if (auto HeaderFile = toHeaderFile(*Header, FileName)) + if (auto Spelled = (sorry for the late dri

[PATCH] D92381: [clangd] Extract per-dir CDB cache to its own threadsafe class. NFC

2020-12-09 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! Comment at: clang-tools-extra/clangd/GlobalCompilationDatabase.cpp:79 + // Absolute canonical path that we're the cache for. (Not case-folded). + std::str

[PATCH] D92663: [clangd] Add hot-reload of compile_commands.json and compile_flags.txt

2020-12-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. this mostly LGTM. there are some changes to the existing behavior; like discovery order and not looking for other plugins under `build/`, but they seem like non-harmful changes to me. my biggest question is, have we considered updating `CompilationDatabasePlugin` inte

[PATCH] D89670: [clangd] Store the containing symbol for refs

2020-11-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added inline comments. Comment at: clang-tools-extra/clangd/unittests/SymbolCollectorTests.cpp:770 +EXPECT_TRUE(bool(Ref)); +if (!AllowNull) + EXPECT_FALSE(Ref->Container.isNull()); nit: instead of making thi

[PATCH] D90682: [clangd][NFC] Make Located::operator->() use pointer sematics

2020-11-03 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. Ah thanks for catching this. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90682/new/ https://reviews.llvm.org/D90682 ___

[PATCH] D90270: [clangd] Handle absolute/relative path specifications in Config

2020-11-03 Thread Kadir Cetinkaya 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 rG7f059a258a1d: [clangd] Handle absolute/relative path specifications in Config (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D90455: [clangd] Pass parameters to config apply functions

2020-11-04 Thread Kadir Cetinkaya 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 rGa57550def15e: [clangd] Pass parameters to config apply functions (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D90746: [clangd] Cleanup dependencies around RemoteIndex

2020-11-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added reviewers: sammccall, kbobyrev. Herald added subscribers: cfe-commits, usaxena95, arphaman, mgorny. Herald added a project: clang. kadircet requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. RemoteIndexClient implemen

[PATCH] D90747: [clangd] Mark AsyncTaskRunner::runAsync as const

2020-11-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman. Herald added a project: clang. kadircet requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. RunAsync performs a write that's internally

[PATCH] D90748: [clangd] Introduce config parsing for External blocks

2020-11-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman. Herald added a project: clang. kadircet requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. Enable configuration of remote and static i

[PATCH] D90749: [clangd] Introduce config compilation for External blocks

2020-11-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman. Herald added a project: clang. kadircet requested review of this revision. Herald added subscribers: ormris, MaskRay, ilya-biryukov. Compilation logic for External bloc

[PATCH] D90750: [clangd] Introduce ProjectAwareIndex

2020-11-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman, mgorny. Herald added a project: clang. kadircet requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. An index implementation that can di

[PATCH] D90750: [clangd] Introduce ProjectAwareIndex

2020-11-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet planned changes to this revision. kadircet added a comment. This is a WIP patch. Provided as a way to demonstrate how `ExternalBlock` will be used in an index implementation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90750/new/ https:

[PATCH] D90751: [clangd] Use ProjectAwareIndex

2020-11-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman. Herald added a project: clang. kadircet requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. Put project-aware-index between command-lin

[PATCH] D90746: [clangd] Cleanup dependencies around RemoteIndex

2020-11-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/CMakeLists.txt:115 LINK_LIBS + clangdRemoteIndex clangdSupport kbobyrev wrote: > If we're moving `clangdRemoteIndex` to `clangDaemon` there is no need to link > `clangd` itself to `clang

[PATCH] D90746: [clangd] Cleanup dependencies around RemoteIndex

2020-11-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 302820. kadircet marked 2 inline comments as done. kadircet added a comment. - Revert indentation changes - Move all libraries to private to be consistent on what we link in ClangdMain. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION http

[PATCH] D90746: [clangd] Cleanup dependencies around RemoteIndex

2020-11-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGed424b42880e: [clangd] Cleanup dependencies around RemoteIndex (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90746/new/ https://revi

[PATCH] D90775: [clangd] ExternalIndex turns off BackgroundIndex only if it isn't set

2020-11-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman. Herald added a project: clang. kadircet requested review of this revision. Herald added subscribers: ormris, MaskRay, ilya-biryukov. This will enable users to have a `B

[PATCH] D90750: [clangd] Introduce ProjectAwareIndex

2020-11-06 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 303442. kadircet added a comment. The index has the following query semantics: - Lookup: it only queries the associated index. This is to not regress latency for operations like Hover and Go-To. - FuzzyFind only queries the associated index when RestrictF

[PATCH] D91049: [clangd][remote] Check an index file correctly

2020-11-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/index/remote/server/Server.cpp:365 } + auto Index = std::make_unique(std::move(SymIndex)); well actually w

[PATCH] D91051: [clangd] Improve clangd-indexer performance

2020-11-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/indexer/IndexerMain.cpp:46 Opts.CountReferences = true; +Opts.FileFilter = [&](const SourceManager &SM, FileID FID) { + const auto *F = SM.getFileEntryForID(FID); this changes the

[PATCH] D90748: [clangd] Introduce config parsing for External blocks

2020-11-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 303824. kadircet marked 6 inline comments as done. kadircet added a comment. - Update comments - Drop the warning for specifying server on non-grpc builds Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90748/new

[PATCH] D91051: [clangd] Improve clangd-indexer performance

2020-11-09 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. Looks like everyone thinks that this sounds reasonable. So LGTM. Thanks for the patch! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91051/n

[PATCH] D90748: [clangd] Introduce config parsing for External blocks

2020-11-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. (sorry looks like i forgot to hit submit :( ) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90748/new/ https://reviews.llvm.org/D90748 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D90748: [clangd] Introduce config parsing for External blocks

2020-11-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. > (Meta-point: not sure how useful splitting this patch out from the compile > step is...) I wanted to keep them separate especially to ensure testing isn't mixed up. As these things tend to get big easily :/ Comment at: clang-tools-extra/clangd/Con

[PATCH] D90749: [clangd] Introduce config compilation for External blocks

2020-11-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked 5 inline comments as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/ConfigCompile.cpp:256 + diag(Error, "At least one of File or Server must be specified.", + llvm::SMRange()); + return; sammccall wr

[PATCH] D90749: [clangd] Introduce config compilation for External blocks

2020-11-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 303956. kadircet added a comment. - Define an ExternalIndexSpec structure, and populate that during compile. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90749/new/ https://reviews.llvm.org/D90749 Files: c

[PATCH] D90747: [clangd] Mark AsyncTaskRunner::runAsync as const

2020-11-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D90747#2379406 , @sammccall wrote: > AsyncTaskRunner is definitely threadsafe, but const doesn't exactly mean > threadsafe... Right, I was also trying to punt on the idea of "writes are synchronized" rather than promising th

[PATCH] D89296: [clangd] Implement call hierarchy (incoming calls)

2020-11-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. Thanks, I skimmed over it (again) and I think this looks pretty great in general. I couldn't take a look at the details yet, I would really appreciate it if you could chop this one into smaller pieces (i know, i asked it before, but this is still too big). I suppose so

[PATCH] D90116: [llvm] CMake: Force MSVC to read code as UTF-8

2020-11-09 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/D90116/new/ https://reviews.llvm.org/D90116

[PATCH] D90747: [clangd] Mark AsyncTaskRunner::runAsync as const

2020-11-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet abandoned this revision. kadircet added a comment. SG, gonna abandon this one and mark the threadpool as mutable in the ProjectAwareIndex instead. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90747/new/ https://reviews.llvm.org/D90747 _

<    14   15   16   17   18   19   20   21   22   23   >