From 22f81250889b2e366187ee1465ba0ec71a6e457d Mon Sep 17 00:00:00 2001 From: Sam McCall Date: Wed, 11 Dec 2019 15:40:23 +0100 Subject: [PATCH] [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 --- clang/lib/Tooling/Syntax/Tokens.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/clang/lib/Tooling/Syntax/Tokens.cpp b/clang/lib/Tooling/Syntax/Tokens.cpp index 7c7a442..9659582 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 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; -- 2.7.4