mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 12:43:36 +01:00
[clangd] Support multiple cursors in selectionRange.
Summary: One change: because there's no way to signal failure individually for each cursor, we now "succeed" with an empty range with no parent if a cursor doesn't point at anything. Reviewers: usaxena95 Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D76741
This commit is contained in:
parent
c9838f5f9f
commit
a95e919d47
@ -68,12 +68,14 @@ public:
|
|||||||
/// Crashes if there isn't exactly one.
|
/// Crashes if there isn't exactly one.
|
||||||
size_t point(llvm::StringRef Name = "") const;
|
size_t point(llvm::StringRef Name = "") const;
|
||||||
/// Returns the position of all points marked by ^ (or $name^) in the text.
|
/// Returns the position of all points marked by ^ (or $name^) in the text.
|
||||||
|
/// Order matches the order within the text.
|
||||||
std::vector<size_t> points(llvm::StringRef Name = "") const;
|
std::vector<size_t> points(llvm::StringRef Name = "") const;
|
||||||
|
|
||||||
/// Returns the location of the range marked by [[ ]] (or $name[[ ]]).
|
/// Returns the location of the range marked by [[ ]] (or $name[[ ]]).
|
||||||
/// Crashes if there isn't exactly one.
|
/// Crashes if there isn't exactly one.
|
||||||
Range range(llvm::StringRef Name = "") const;
|
Range range(llvm::StringRef Name = "") const;
|
||||||
/// Returns the location of all ranges marked by [[ ]] (or $name[[ ]]).
|
/// Returns the location of all ranges marked by [[ ]] (or $name[[ ]]).
|
||||||
|
/// They are ordered by start position within the text.
|
||||||
std::vector<Range> ranges(llvm::StringRef Name = "") const;
|
std::vector<Range> ranges(llvm::StringRef Name = "") const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user