[PATCH] D56314: [clangd] Don't store completion info if the symbol is not used for code completion.

2019-01-05 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Might we want to keep some of this information for `workspace/symbol`? I mean, surely not "documentation", but perhaps "signature" and "return type"? For example, when cquery responds to `workspace/symbol`, it puts into `SymbolInformation.name` a "detailed name"

[PATCH] D59407: [clangd] Add RelationSlab

2019-04-01 Thread Nathan Ridge via Phabricator via cfe-commits
nridge requested review of this revision. nridge added a reviewer: sammccall. nridge added a comment. I guess I should clear the "Accepted" status until we settle the question of the data model. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D60040: [clangd] Use capacity() instead of size() in RefSlab::bytes()

2019-03-31 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. I do not. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60040/new/ https://reviews.llvm.org/D60040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D59756: [clangd] Support dependent bases in type hierarchy

2019-03-24 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. nridge added a reviewer: sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ioeric, ilya-biryukov. Herald added a project: clang. Dependent bases are handled heuristically, by replacing them with the class template that they are a

[PATCH] D59756: [clangd] Support dependent bases in type hierarchy

2019-03-24 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. This patch aims to implement the more proper solution suggested here . I couldn't actually use `CXXRecordDecl->getTemplateInstantiationPattern()` as suggested, because the base-specifiers resolve to types, not

[PATCH] D59756: [clangd] Support dependent bases in type hierarchy

2019-04-05 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 194002. nridge marked 6 inline comments as done. nridge added a comment. Address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59756/new/ https://reviews.llvm.org/D59756 Files:

[PATCH] D59407: [clangd] Add RelationSlab

2019-04-05 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D59407#1456394 , @sammccall wrote: > One thing that strikes me here is that this case is very similar to our > existing Ref data - it's basically a subset, but with a symbolid payload > instead of location. We could consider

[PATCH] D57560: [clangd] Link libclangAST into clangd tool

2019-03-30 Thread Nathan Ridge via Phabricator via cfe-commits
nridge abandoned this revision. nridge added a comment. Herald added a subscriber: cfe-commits. Abandoning as this has been fixed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57560/new/ https://reviews.llvm.org/D57560

[PATCH] D60040: [clangd] Use capacity() instead of size() in RefSlab::bytes()

2019-03-30 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. This was suggested in this comment . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60040/new/ https://reviews.llvm.org/D60040

[PATCH] D60040: [clangd] Use capacity() instead of size() in RefSlab::bytes()

2019-03-30 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. nridge added a reviewer: gribozavr. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ioeric, ilya-biryukov. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D60040 Files:

[PATCH] D59407: [clangd] Add RelationSlab

2019-03-28 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. @sammccall, thank you for having a look at this. I have no objection to revising the data model if there's agreement on a better one. In D59407#1446464 , @sammccall wrote: > - I don't think we yet know what the more

[PATCH] D59407: [clangd] Add RelationSlab

2019-03-26 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. As this is the first of a series of patches adding support for relations, and then building type hierarchy subtypes on top (as discussed here ), how should we go about landing this -- should we land each patch in the series as

[PATCH] D59407: [clangd] Add RelationSlab

2019-03-26 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Ok, cool. In that case, I think this patch is ready to be committed, and would appreciate it if someone could commit it. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59407/new/ https://reviews.llvm.org/D59407

[PATCH] D56370: [clangd] Add support for type hierarchy (super types only for now)

2019-03-03 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 189114. nridge added a comment. Address a couple of outstanding TODOs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56370/new/ https://reviews.llvm.org/D56370 Files:

[PATCH] D56370: [clangd] Add support for type hierarchy (super types only for now)

2019-03-02 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 189065. nridge added a comment. Rebased. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56370/new/ https://reviews.llvm.org/D56370 Files: clang-tools-extra/clangd/ClangdLSPServer.cpp

[PATCH] D58880: [WIP] [Looking for API feedback] [clangd] Type hierarchy subtypes

2019-03-02 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. nridge added reviewers: sammccall, kadircet. Herald added subscribers: cfe-commits, jdoerfert, arphaman, mgrang, jkorous, MaskRay, ioeric, ilya-biryukov. Herald added a project: clang. This is an early draft of an implementation of type hierarchy subtypes. There is

[PATCH] D58880: [WIP] [Looking for API feedback] [clangd] Type hierarchy subtypes

2019-03-04 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D58880#1416754 , @kadircet wrote: > Sorry I didn't notice the mailing thread beforehand, looks like Sam had a > good point regarding performing operations on types rather than >

[PATCH] D58880: [WIP] [Looking for API feedback] [clangd] Type hierarchy subtypes

2019-03-04 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 189275. nridge added a comment. Add tests involving templates and template specializations Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58880/new/ https://reviews.llvm.org/D58880 Files:

[PATCH] D58880: [WIP] [Looking for API feedback] [clangd] Type hierarchy subtypes

2019-03-05 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D58880#1418195 , @hokein wrote: > I think we can extend the existing Ref to support it, so that most of the > stuff could be reused, rather than implementing a new slab: > > - introduce a new RefKind, like BaseOf > - add a new

[PATCH] D56370: [clangd] Add support for type hierarchy (super types only for now)

2019-03-05 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 189444. nridge marked 10 inline comments as done. nridge added a comment. Address most of the latest review comments. The infinite recursion issue remains to be fixed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D56370: [clangd] Add support for type hierarchy (super types only for now)

2019-03-05 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked an inline comment as done. nridge added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:885 +static Optional +getTypeHierarchy(const CXXRecordDecl , ASTContext , int Levels, + TypeHierarchyDirection Direction) {

[PATCH] D56370: [clangd] Add support for type hierarchy (super types only for now)

2019-03-05 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clangd/ClangdServer.cpp:365 Callback CB) { - auto Action = [Sel](decltype(CB) CB, std::string File, -std::string TweakID, -Expected

[PATCH] D56370: [clangd] Add support for type hierarchy (super types only for now)

2019-03-03 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 189092. nridge marked 2 inline comments as done. nridge added a comment. Address latest review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56370/new/ https://reviews.llvm.org/D56370 Files:

[PATCH] D58880: [WIP] [Looking for API feedback] [clangd] Type hierarchy subtypes

2019-03-03 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 189093. nridge added a comment. Rebased onto updated D56370 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58880/new/ https://reviews.llvm.org/D58880 Files:

[PATCH] D58880: [WIP] [Looking for API feedback] [clangd] Type hierarchy subtypes

2019-03-03 Thread Nathan Ridge via Phabricator via cfe-commits
nridge removed a reviewer: sammccall. nridge added a comment. Removing Sam as reviewer as he's on parental leave. Kadir, if you have other reviewers to suggest to provide feedback on the API changes here, please feel free to add them. Thanks! Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D56370: [clangd] Add support for type hierarchy (super types only for now)

2019-03-03 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked 19 inline comments as done. nridge added inline comments. Comment at: clang-tools-extra/clangd/Protocol.cpp:830 +return false; + if (auto *Resolve = Params.getAsObject()->get("resolve")) { +if (!fromJSON(*Resolve, R.resolve)) { sammccall

[PATCH] D56370: [clangd] Add support for type hierarchy (super types only for now)

2019-02-26 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. I think this is ready to continue to be reviewed :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56370/new/ https://reviews.llvm.org/D56370 ___ cfe-commits mailing list

[PATCH] D59407: [clangd] Add RelationSlab

2019-03-17 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked 7 inline comments as done. nridge added inline comments. Comment at: clang-tools-extra/clangd/index/Index.h:43 +public: + using value_type = std::pair>; + using const_iterator = std::vector::const_iterator; kadircet wrote: > gribozavr wrote: > >

[PATCH] D59407: [clangd] Add RelationSlab

2019-03-17 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 191036. nridge marked an inline comment as done. nridge added a comment. Herald added a subscriber: mgorny. Address review comments, except for the deduplication which is still under discussion Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D59407: [clangd] Add RelationSlab

2019-03-17 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D59407#1430656 , @kadircet wrote: > I believe it makes sense to deduplicate SymbolIDs for RelationSlab. > Up until now, we mostly had only one occurence of a SymbolID in a Slab, but > RelationSlab does not follow that

[PATCH] D56370: [clangd] Add support for type hierarchy (super types only for now)

2019-03-17 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Great, thanks for the reviews! Could you commit the patch as well? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56370/new/ https://reviews.llvm.org/D56370 ___ cfe-commits

[PATCH] D58880: [WIP] [Looking for API feedback] [clangd] Type hierarchy subtypes

2019-03-17 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D58880#1422494 , @kadircet wrote: > Also please have a look at D59083 , and make > sure it helps implement what you have in might and let me know if there's > anything missing. I verified

[PATCH] D56370: [clangd] Add support for type hierarchy (super types only for now)

2019-03-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. > In D56370#1424180 , @nridge wrote: > >> Unfortunately, there is a further problem: the Theia client-side >> implementation of type hierarchy has recently merged, and their code has >> changed so that they do require

[PATCH] D56370: [clangd] Add support for type hierarchy (super types only for now)

2019-03-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 190375. nridge added a comment. Address remaining review comments (I figure out how to write a lit test) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56370/new/ https://reviews.llvm.org/D56370 Files:

[PATCH] D56370: [clangd] Add support for type hierarchy (super types only for now)

2019-03-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D56370#1426234 , @kadircet wrote: > Unfortunately we usually test LSP layer with lit tests, and since we don't > have any lit tests for this use-case it wasn't caught. Could you add a lit > test for overall use case? You can

[PATCH] D56370: [clangd] Add support for type hierarchy (super types only for now)

2019-03-10 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 190041. nridge added a comment. Fix a (somewhat amusing) typo where I wrote '0' instead of 'O' in a fromJSON() implementation (Does the fact that this didn't cause any test failures suggest that the fromJSON() functions aren't exercised by any tests?)

[PATCH] D56370: [clangd] Add support for type hierarchy (super types only for now)

2019-03-10 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Unfortunately, there is a further problem: the Theia client-side implementation of type hierarchy has recently merged, and their code has changed so that they do require `typeHierarchy/resolve` to be supported. They ask for 1 level in the initial request, ignore any

[PATCH] D56370: [clangd] Add support for type hierarchy (super types only for now)

2019-03-10 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked an inline comment as done. nridge added a comment. The updated patch addresses the infinite recursion issue by bailing on dependent bases for now, as Sam suggested. I will implement the more comprehensive suggested fix ("bail out once we see instantiations of the same template

[PATCH] D56370: [clangd] Add support for type hierarchy (super types only for now)

2019-03-10 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 190040. nridge added a comment. Address the infinite recursion issue Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56370/new/ https://reviews.llvm.org/D56370 Files:

[PATCH] D59083: [clangd] Store explicit template specializations in index for code navigation purposes

2019-03-11 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Is any representation of the template arguments stored in the index? Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59083/new/ https://reviews.llvm.org/D59083 ___ cfe-commits

[PATCH] D59083: [clangd] Store explicit template specializations in index for code navigation purposes

2019-03-11 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. One of the use cases I imagined for this (unrelated to D58880 ) is that if the user searches for `vector` (using `workspace/symbols`), they get a separate search result for the `vector` primary template, and a separate one for `vector`.

[PATCH] D56370: [clangd] Add support for type hierarchy (super types only for now)

2019-03-14 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked 7 inline comments as done. nridge added inline comments. Comment at: clang-tools-extra/clangd/XRefs.h:62 +/// Find the record type references at \p Pos. +const CXXRecordDecl *findRecordTypeAt(ParsedAST , Position Pos); + ilya-biryukov wrote: > This

[PATCH] D56370: [clangd] Add support for type hierarchy (super types only for now)

2019-03-14 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 190755. nridge marked an inline comment as done. nridge added a comment. Address latest review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56370/new/ https://reviews.llvm.org/D56370 Files:

[PATCH] D59407: [clangd] Add RelationSlab

2019-03-14 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. nridge added a reviewer: kadircet. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ioeric, ilya-biryukov. Herald added a project: clang. RelationSlab is a new index data structure, similar to SymbolSlab and RefSlab. RelationSlab stores relations

[PATCH] D58880: [WIP] [Looking for API feedback] [clangd] Type hierarchy subtypes

2019-03-14 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D58880#1422494 , @kadircet wrote: > Hi Nathan, > > I would also suggest splitting up current changes so that we can start > reviewing them, which might result in other changes in your planned changes > and help reduce

[PATCH] D59407: [clangd] Add RelationSlab

2019-03-14 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked an inline comment as done. nridge added inline comments. Comment at: clang-tools-extra/clangd/index/Index.h:25 +enum class RelationKind { Subtype }; + One thing I'm wondering about is: would it be better to just use `clang::index::SymbolRole`

[PATCH] D58880: [WIP] [Looking for API feedback] [clangd] Type hierarchy subtypes

2019-03-07 Thread Nathan Ridge via Phabricator via cfe-commits
nridge planned changes to this revision. nridge added a comment. Thanks for the detailed analysis! For completeness, I think another advantage of option 3 is that it allows us to make the key for relation lookups be a (SymbolID, RelationKind) pair rather than just a SymbolID. It sounds like I

[PATCH] D59407: [clangd] Add RelationSlab

2019-03-22 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked 2 inline comments as done. nridge added inline comments. Comment at: clang-tools-extra/clangd/index/Relation.h:1 +//===--- Ref.h ---*- C++-*-===// +// gribozavr wrote: > gribozavr wrote: > > "---

[PATCH] D59407: [clangd] Add RelationSlab

2019-03-22 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 191886. nridge added a comment. Scrapped 'struct Relation' and addressed other comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59407/new/ https://reviews.llvm.org/D59407 Files:

[PATCH] D59407: [clangd] Add RelationSlab

2019-03-21 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked 8 inline comments as done. nridge added inline comments. Comment at: clang-tools-extra/clangd/index/Index.h:43 +public: + using value_type = std::pair>; + using const_iterator = std::vector::const_iterator; kadircet wrote: > nridge wrote: > >

[PATCH] D56370: [clangd] Add support for type hierarchy (super types only for now)

2019-02-09 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D56370#1390359 , @sammccall wrote: > So on a concrete but still high-level: > > - I don't think we should implement the `resolve` operation, or resolution > bounds, at this point - this patch doesn't do anything slow. Returning

[PATCH] D56370: [clangd] Add support for type hierarchy (super types only for now)

2019-02-09 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 186137. nridge marked 4 inline comments as done. nridge added a comment. Address Kadir's review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56370/new/ https://reviews.llvm.org/D56370 Files:

[PATCH] D56370: [clangd] Add support for type hierarchy (super types only for now)

2019-02-09 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked 19 inline comments as done. nridge added a comment. Thank you for the reviews! Comment at: clang-tools-extra/clangd/Protocol.h:1026 + /// When not defined, it is treated as `0`. + llvm::Optional resolve; + kadircet wrote: > why not just use an

[PATCH] D56370: [clangd] Add support for type hierarchy (super types only for now)

2019-02-09 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 186139. nridge added a comment. Introduce and use findRecordTypeAt() and typeAncestors() helpers Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56370/new/ https://reviews.llvm.org/D56370 Files:

[PATCH] D56370: [clangd] Add support for type hierarchy (super types only for now)

2019-02-09 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D56370#1390359 , @sammccall wrote: > - in 'XRefs.h', I think the API to introduce is `findTypeAt(Position) -> > Decl*` + `typeAncestors(Decl*)` and later `typeDescendants(Decl*)`, rather > than a single more complex

[PATCH] D56370: [clangd] Add support for type hierarchy (super types only for now)

2019-02-09 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D56370#1391904 , @nridge wrote: > Add tests for scenarios involving class template specializations > > Also improve support for dependent bases (This update is unrelated to the review comments, it's just improvements I had in

[PATCH] D56370: [clangd] Add support for type hierarchy (super types only for now)

2019-02-09 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 186136. nridge added a comment. Add tests for scenarios involving class template specializations Also improve support for dependent bases Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56370/new/

[PATCH] D56370: [clangd] Add support for type hierarchy (super types only for now)

2019-02-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked 2 inline comments as done. nridge added inline comments. Comment at: clang-tools-extra/clangd/ClangdServer.cpp:543 + return CB(InpAST.takeError()); +CB(clangd::getTypeHierarchy(InpAST->AST, Item.range.start, Resolve, +

[PATCH] D56370: [clangd] Add support for type hierarchy (super types only for now)

2019-02-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked an inline comment as done. nridge added inline comments. Herald added a subscriber: jdoerfert. Comment at: clang-tools-extra/clangd/ClangdServer.cpp:543 + return CB(InpAST.takeError()); +CB(clangd::getTypeHierarchy(InpAST->AST, Item.range.start, Resolve, +

[PATCH] D56370: [clangd] Add support for type hierarchy (super types only for now)

2019-02-14 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 186947. nridge added a comment. Fix a test failure Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56370/new/ https://reviews.llvm.org/D56370 Files: clang-tools-extra/clangd/ClangdLSPServer.cpp

[PATCH] D56370: [clangd] Add support for type hierarchy (super types only for now)

2019-02-14 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked an inline comment as done. nridge added inline comments. Comment at: clang-tools-extra/unittests/clangd/XRefsTests.cpp:1604 + dyn_cast((AST, "Parent"))->getTemplatedDecl(); + // TODO: This fails because findDecl() doesn't support template-ids + // const

[PATCH] D56370: [clangd] Add support for type hierarchy (super types only for now)

2019-02-14 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 186944. nridge added a comment. - Rework tests to test the lower-level functions like typeAncestors() - Remove support for typeHierarchy/resolve Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56370/new/

[PATCH] D56611: [clangd] A code action to swap branches of an if statement

2019-01-31 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Herald added a project: LLVM. This commit is causing clangd to fail to link, with errors like this: tools/clang/tools/extra/clangd/refactor/tweaks/CMakeFiles/obj.clangDaemonTweaks.dir/SwapIfBranches.cpp.o:SwapIfBranches.cpp:function

[PATCH] D56611: [clangd] A code action to swap branches of an if statement

2019-01-31 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. The complete commands that's failing is: /usr/bin/clang++-8 -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic

[PATCH] D56611: [clangd] A code action to swap branches of an if statement

2019-01-31 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D56611#1379876 , @sammccall wrote: > Hi Nathan, > What platform is this on? Not seeing it on the buildbots. > Anything unusual in build setup (standalone build, building with shared > libraries, etc)? I'm on Linux, building

[PATCH] D56611: [clangd] A code action to swap branches of an if statement

2019-01-31 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Fix here: https://reviews.llvm.org/D57560 Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56611/new/ https://reviews.llvm.org/D56611 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D56370: [clangd] Add support for type hierarchy (super types only for now)

2019-02-03 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 184984. nridge edited the summary of this revision. nridge added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. This completes the implementation of the revised spec (for supertypes only) Repository: rG LLVM Github

[PATCH] D56370: [clangd] Add support for type hierarchy (super types only for now)

2019-02-03 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 184985. nridge added a comment. remove unrelated file Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56370/new/ https://reviews.llvm.org/D56370 Files: clang-tools-extra/clangd/ClangdLSPServer.cpp

[PATCH] D56370: [clangd] Add support for type hierarchy (super types only for now)

2019-02-03 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked 3 inline comments as done. nridge added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:820 +// TODO: Reduce duplication between this function and declToSym(). +static llvm::Optional I am open to feedback on whether we want to

[PATCH] D59756: [clangd] Support dependent bases in type hierarchy

2019-04-06 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked an inline comment as done. nridge added inline comments. Comment at: clang-tools-extra/unittests/clangd/TypeHierarchyTests.cpp:405 + *Result, + AllOf(WithName("S"), WithKind(SymbolKind::Struct), +Parents(AllOf(WithName("S"),

[PATCH] D59756: [clangd] Support dependent bases in type hierarchy

2019-04-11 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked an inline comment as done. nridge added inline comments. Comment at: clang-tools-extra/unittests/clangd/TypeHierarchyTests.cpp:405 + *Result, + AllOf(WithName("S"), WithKind(SymbolKind::Struct), +Parents(AllOf(WithName("S"),

[PATCH] D60954: [clangd] Test case demonstrating variable template issue

2019-04-21 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Please see further details in this clangd-dev post . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60954/new/ https://reviews.llvm.org/D60954

[PATCH] D59407: [clangd] Add RelationSlab

2019-04-21 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Hi, any update here? I would appreciate some guidance so I can move forward with this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59407/new/ https://reviews.llvm.org/D59407

[PATCH] D60953: [clangd] Respect clang-tidy suppression comments

2019-04-21 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. nridge added a reviewer: hokein. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ioeric. Herald added a project: clang. This partially fixes https://bugs.llvm.org/show_bug.cgi?id=41218. Repository: rG LLVM Github Monorepo

[PATCH] D59756: [clangd] Support dependent bases in type hierarchy

2019-04-21 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Ping - could this be committed please? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59756/new/ https://reviews.llvm.org/D59756 ___ cfe-commits mailing list

[PATCH] D59756: [clangd] Support dependent bases in type hierarchy

2019-04-21 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Thanks! Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59756/new/ https://reviews.llvm.org/D59756 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D60954: [clangd] Test case demonstrating variable template issue

2019-04-21 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ioeric, ilya-biryukov. Herald added a project: clang. This is not meant to be committed, it's meant to demonstrate an issue with using RecursiveASTVisitor with TestTU on code that contains

[PATCH] D59407: [clangd] Add RelationSlab

2019-04-25 Thread Nathan Ridge via Phabricator via cfe-commits
nridge planned changes to this revision. nridge added a comment. In D59407#1478794 , @sammccall wrote: > So if you can stomach it, I think > > > **Approach 2: Add a RelationSlab storing (subject, predicate, object) > > triples, intended for sparse

[PATCH] D60953: [clangd] Respect clang-tidy suppression comments

2019-04-25 Thread Nathan Ridge via Phabricator via cfe-commits
nridge edited reviewers, added: ilya-biryukov; removed: hokein. nridge added a comment. Changing reviewers as I understand @hokein is on vacation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60953/new/ https://reviews.llvm.org/D60953

[PATCH] D60953: [clangd] Respect clang-tidy suppression comments

2019-04-28 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 197040. nridge marked 3 inline comments as done. nridge added a comment. Address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60953/new/ https://reviews.llvm.org/D60953 Files:

[PATCH] D60953: [clangd] Respect clang-tidy suppression comments

2019-04-28 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp:395 + DiagLevel != DiagnosticsEngine::Fatal && + LineIsMarkedWithNOLINTinMacro(Info.getSourceManager(), +

[PATCH] D61841: [clangd] Respect WarningsAsErrors configuration for clang-tidy

2019-05-14 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 199552. nridge marked 2 inline comments as done. nridge added a comment. Address review comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61841/new/ https://reviews.llvm.org/D61841 Files:

[PATCH] D60953: [clangd] Respect clang-tidy suppression comments

2019-05-14 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 199551. nridge marked 9 inline comments as done. nridge added a comment. Address review comments, except for the derived class one, about which I have a question Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D60953: [clangd] Respect clang-tidy suppression comments

2019-05-14 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clangd/ClangdUnit.cpp:243 +// future). +class ClangdDiagnosticConsumer : public StoreDiags { +public: sammccall wrote: > Thanks, this is much cleaner. > > I think we don't need the subclass at all

[PATCH] D61841: [clangd] Respect WarningsAsErrors configuration for clang-tidy

2019-05-14 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clangd/ClangdUnit.cpp:346 + std::string CheckName = CTContext->getCheckName(Info.getID()); + if (!CheckName.empty() && WarningAsErrorFilter->contains(CheckName)) { +Level = DiagnosticsEngine::Error;

[PATCH] D59407: [clangd] Add RelationSlab

2019-05-22 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 200735. nridge added a comment. Herald added a subscriber: mgrang. Implemented discussed design approach ("Add a RelationSlab storing (subject, predicate, object) triples, intended for sparse relations") Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D41911: [clangd] Include scanner that finds compile commands for headers.

2019-05-08 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Herald added subscribers: jfb, kadircet, arphaman, jkorous, MaskRay. Herald added a project: clang. Are there are plans to move forward with this sort of an include scanning approach? Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION

[PATCH] D60953: [clangd] Respect clang-tidy suppression comments

2019-05-20 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Thank you MaskRay! Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60953/new/ https://reviews.llvm.org/D60953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D61841: [clangd] Respect WarningsAsErrors configuration for clang-tidy

2019-05-16 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 199956. nridge added a comment. Update as per changes to dependent patch D60953 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61841/new/ https://reviews.llvm.org/D61841

[PATCH] D61841: [clangd] Respect WarningsAsErrors configuration for clang-tidy

2019-05-16 Thread Nathan Ridge via Phabricator via cfe-commits
nridge edited reviewers, added: sammccall; removed: ilya-biryukov. nridge added a subscriber: sammccall. nridge added a comment. Herald added a subscriber: ilya-biryukov. Changing reviewer to @sammccall as the updates to the patch are closely related to the discussion in D60953

[PATCH] D60953: [clangd] Respect clang-tidy suppression comments

2019-05-16 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 199954. nridge marked 5 inline comments as done. nridge added a comment. Address latest review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60953/new/ https://reviews.llvm.org/D60953 Files:

[PATCH] D61842: [WIP] [Not ready for review] Semantic highlighting

2019-05-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. Herald added subscribers: cfe-commits, kadircet, arphaman, mgrang, jkorous, javed.absar, mgorny. Herald added a project: clang. nridge planned changes to this revision. Done: - Basic plumbing - Encoding of semantic highlighting tokens into the protocol format -

[PATCH] D60953: [clangd] Respect clang-tidy suppression comments

2019-05-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Friendly review ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60953/new/ https://reviews.llvm.org/D60953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D61841: [clangd] Respect WarningsAsErrors configuration for clang-tidy

2019-05-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. nridge added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay. Herald added a project: clang. This completes the fix for https://bugs.llvm.org/show_bug.cgi?id=41218. Repository: rG LLVM Github Monorepo

[PATCH] D61842: [clangd] [WIP] [Not ready for review] Semantic highlighting

2019-05-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 199202. nridge added a comment. Add [clangd] to title Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61842/new/ https://reviews.llvm.org/D61842 Files: clang-tools-extra/clangd/CMakeLists.txt

[PATCH] D60953: [clangd] Respect clang-tidy suppression comments

2019-05-17 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Could someone merge this and D61841 now that they're approved? Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60953/new/ https://reviews.llvm.org/D60953

[PATCH] D62459: [clangd] Serialization support for RelationSlab

2019-05-25 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. nridge added a reviewer: kadircet. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. This builds on D59407 to provide YAML and RIFF serialization support. Repository:

[PATCH] D59407: [clangd] Add RelationSlab

2019-05-25 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clangd/index/Relation.cpp:19 +llvm::iterator_range +RelationSlab::lookup(const SymbolID , + index::SymbolRole Predicate) const { kadircet wrote: > I would suggest adding another

[PATCH] D59407: [clangd] Add RelationSlab

2019-05-25 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 201427. nridge marked 19 inline comments as done. nridge added a comment. Address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59407/new/ https://reviews.llvm.org/D59407 Files:

[PATCH] D62471: [clangd] SymbolCollector support for relations

2019-05-26 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. nridge added a reviewer: kadircet. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. The only relation currently collected is RelationBaseOf, because this is all we need for type hierarchy subtypes.

  1   2   >