This is an archive of the discontinued LLVM Phabricator instance.

[clangd][WIP] Make use of SyntaxTrees for SemanticSelection
Needs ReviewPublic

Authored by kadircet on Jul 30 2020, 12:45 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

This patch is not intended for production, it is merely an experiment
to see how SyntaxTrees can be used inside clangd.

Depends on D84973

Diff Detail

Event Timeline

kadircet created this revision.Jul 30 2020, 12:45 PM
kadircet requested review of this revision.Jul 30 2020, 12:45 PM
gribozavr2 added inline comments.
clang-tools-extra/clangd/SemanticSelection.cpp
51

It would be nice to make it into a method on syntax::Node itself, or otherwise put it into a shared location, include/clang/Tooling/Syntax/???.h.

60

lastLeaf() is traversing all children. Instead, you could compare against the location of C->nextSibling()->firstLeaf().

nridge added a subscriber: nridge.Aug 2 2020, 7:07 PM