diff options
author | Sam McCall <sam.mccall@gmail.com> | 2019-12-11 15:40:23 +0100 |
---|---|---|
committer | Sam McCall <sam.mccall@gmail.com> | 2019-12-13 16:57:03 +0100 |
commit | 22f81250889b2e366187ee1465ba0ec71a6e457d (patch) | |
tree | 40589233983328e747e3772efb1bf7849945db31 /clang/lib | |
parent | 0eb0992739189dba0d86af33722bc27260a9b555 (diff) | |
download | bcm5719-llvm-22f81250889b2e366187ee1465ba0ec71a6e457d.tar.gz bcm5719-llvm-22f81250889b2e366187ee1465ba0ec71a6e457d.zip |
[Tooling/Syntax] Helpers to find spelled tokens touching a location.
Summary: Useful when positions are used to target nodes, with before/after ambiguity.
Reviewers: ilya-biryukov, kbobyrev
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D71356
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Tooling/Syntax/Tokens.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/clang/lib/Tooling/Syntax/Tokens.cpp b/clang/lib/Tooling/Syntax/Tokens.cpp index 7c7a442dff0..96595826ddb 100644 --- a/clang/lib/Tooling/Syntax/Tokens.cpp +++ b/clang/lib/Tooling/Syntax/Tokens.cpp @@ -254,7 +254,6 @@ syntax::spelledTokensTouching(SourceLocation Loc, assert(Loc.isFileID()); llvm::ArrayRef<syntax::Token> All = Tokens.spelledTokens(Tokens.sourceManager().getFileID(Loc)); - // Comparing SourceLocations is well-defined within a FileID. auto *Right = llvm::partition_point( All, [&](const syntax::Token &Tok) { return Tok.location() < Loc; }); bool AcceptRight = Right != All.end() && Right->location() <= Loc; |