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

Sam McCall via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 11 01:34:28 PST 2019


(Sorry, hit enter too soon and truncated one of the comments)

On Mon, Feb 11, 2019 at 10:32 AM Sam McCall via Phabricator <
reviews at reviews.llvm.org> wrote:

> sammccall added a comment.
>
> In D56370#1391924 <https://reviews.llvm.org/D56370#1391924>, @nridge
> wrote:
>
> > As far as reworking the tests to use these functions, I've thought about
> that a bit:
> >
> > - These functions return AST nodes. It's not clear to me how I would
> come up with "expected" AST nodes to test the return values against.
> See FindDecl
>
See the findDecl overloads in TestTU.h - we use these for such tests.

> - Even if we find a way to get "expected" AST nodes, we would be losing
> test coverage of functions like `declToTypeHierarchyItem()` (though I
> suppose we could write separate tests for that).
>
Yes, please do add unit tests for the functions separately - findDecl()
also words to get the input to that function.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190211/72b3a503/attachment.html>


More information about the cfe-commits mailing list