[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 cfe-com

[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 clang-tools-extra/clangd

[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] 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 wr

[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: clang-to

[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: clang-tools-extra/

[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 SINC

[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: clang-tools-extra/clangd/ClangdLSPServer.c

[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: clang-tools-extra/cla

[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 > symbols(http://lists.llvm.org/pipermail/clangd-de

[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 f

[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 https://reviews.llvm.or

[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-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 &CXXRD, ASTContext &ASTCtx, int Levels, + TypeHierarchyDirection Direction) { -

[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] 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: clang-tools-extra/clangd/ClangdLSPServer.cp

[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 dec

[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?) Repo

[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 extr

[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 mail

[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`. F

[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 `typeHierarc

[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 se

[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: clang-

[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 &AST, Position Pos); + ilya-biryukov wrote: > T

[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: clang-to

[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 be

[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 duplicate

[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` her

[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 mail

[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 that

[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 assumptio

[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 ACTION

[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: > > kadi

[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: > > "--- Rela

[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: clang-tools-extra/clangd

[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 specializ

[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 decl

[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 soo

[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] 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 resource-crit

[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 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: clang-tools-extra/c

[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-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 https://lists.llvm.org

[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 https://reviews.llvm.org/D59407/n

[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 ju

[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: clang-tools-ext

[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"), WithKind(SymbolKind

[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"), WithKind(SymbolKind

[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 https://rev

[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 cfe-commits@lists.ll

[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] 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 a

[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] 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 https://lists.llvm.org/cgi-bin/mailman/l

[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 relatio

[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: clang-tools-ext

[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(), + Info.getLocation(

[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 https://reviews.llvm.

[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 clang::RecursiveASTVisitor::Traverse

[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. 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 -Wno-l

[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 https:

[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 Monorep

[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 clang-tools

[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 redu

[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/ https://reviews

[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 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 i

[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: clang-t

[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 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: clang-tools-ext

[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 `typeHiera

[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-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, +Directi

[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/ https://r

[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(&findDecl(AST, "Parent"))->getTemplatedDecl(); + // TODO: This fails because findDecl() doesn't support template-ids + // c

[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 clang-tools-ex

[PATCH] D59407: [clangd] Add RelationSlab

2019-05-30 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 202369. nridge added a comment. Address latest review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59407/new/ https://reviews.llvm.org/D59407 Files: clang-tools-extra/clangd/CMakeLists.txt clang-t

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

2019-05-30 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 202370. nridge marked 8 inline comments as done. nridge added a comment. Addressed most review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62459/new/ https://reviews.llvm.org/D62459 Files: clang-to

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

2019-05-30 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clangd/index/Serialization.h:81 +// Used for serializing SymbolRole as used in Relation. +enum class RelationKind : uint8_t { ChildOf = 1, BaseOf }; +llvm::Expected symbolRoleToRelationKind(index::SymbolRole); --

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

2019-05-30 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 202371. nridge marked 11 inline comments as done. nridge added a comment. Addressed most review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62471/new/ https://reviews.llvm.org/D62471 Files: clang-t

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

2019-05-30 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clangd/index/SymbolCollector.cpp:298 + + processRelations(*ND, *ID, Relations); + kadircet wrote: > why do we want to process these relations for references? The `RelationBaseOf` is not present in the `

[PATCH] D59407: [clangd] Add RelationSlab

2019-06-02 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL362352: [clangd] Add RelationSlab (authored by nridge, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D59407?vs=

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

2019-06-02 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. nridge marked 4 inline comments as done. Closed by commit rL362353: [clangd] Serialization support for RelationSlab (authored by nridge, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits.

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

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

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

2019-06-03 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D62471#1527085 , @kadircet wrote: > LGTM, thanks! Thanks for the reviews so far! > I suppose there are only two patches left now? > > - Exposing relations in `SymbolIndex`. > - Implementing children resolution using that info

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

2019-06-03 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL362467: [clangd] SymbolCollector support for relations (authored by nridge, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://review

[PATCH] D62839: [WIP] [clangd] Index API and implementations for relations

2019-06-03 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. Remaining work: - BackgroundIndex implementation - Dex implementation Repository: rG LLVM Github Monorepo https:/

[PATCH] D62839: [WIP] [clangd] Index API and implementations for relations

2019-06-03 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. This isn't quite ready for a thorough review, but I have a question for now: in `BackgroundIndex::update`, there is a step where we partition symbols and references into files. For relations, should we include a copy in both the file containing the definition of the sub

[PATCH] D62839: [WIP] [clangd] Index API and implementations for relations

2019-06-04 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 203072. nridge added a comment. Fill in BackgroundIndex and Dex implementations Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62839/new/ https://reviews.llvm.org/D62839 Files: clang-tools-extra/clangd/index/B

[PATCH] D62839: [clangd] Index API and implementations for relations

2019-06-04 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Ok, this is probably ready for a first round of review now. I know I should add new test cases to at least DexTests and BackgroundIndexTests, I'll do this in the next version of the patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[PATCH] D58880: [WIP] [clangd] Type hierarchy subtypes

2019-06-04 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 203073. nridge added a comment. Rebased onto D62839 and predecessors Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58880/new/ https://reviews.llvm.org/D58880 Files: clang-too

[PATCH] D62839: [clangd] Index API and implementations for relations

2019-06-06 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 203495. nridge marked 16 inline comments as done. nridge added a comment. Addressed most review comments, also added some tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62839/new/ https://reviews.llvm.org/D

[PATCH] D62839: [clangd] Index API and implementations for relations

2019-06-06 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clangd/index/Index.h:107 + virtual void + relations(const SymbolID &Subject, index::SymbolRole Predicate, +llvm::function_ref Callback) const = 0; kadircet wrote: > We might need additional

[PATCH] D62839: [clangd] Index API and implementations for relations

2019-06-11 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clangd/index/FileIndex.cpp:250 Path, llvm::make_unique(std::move(Symbols)), - llvm::make_unique(), /*CountReferences=*/false); + llvm::make_unique(), llvm::make_unique(), + /*CountReferences=*/false

[PATCH] D62839: [clangd] Index API and implementations for relations

2019-06-11 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 204189. nridge marked 9 inline comments as done. nridge added a comment. Address remaining review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62839/new/ https://reviews.llvm.org/D62839 Files: clang

  1   2   3   4   5   6   7   8   9   10   >