[Syntax] Add a helper to find expansion by its first spelled token
authorIlya Biryukov <ibiryukov@google.com>
Tue, 18 Jun 2019 16:27:27 +0000 (16:27 +0000)
committerIlya Biryukov <ibiryukov@google.com>
Tue, 18 Jun 2019 16:27:27 +0000 (16:27 +0000)
commit5aed309a4f6bcf06d79754a037ec275c79d92dd5
tree2e5934c40c89aa7f017433af40774c9e174464bd
parentc470ac50a8a45aa62ba50d435ff3048c6c274273
[Syntax] Add a helper to find expansion by its first spelled token

Summary: Used in clangd for a code tweak that expands a macro.

Reviewers: sammccall

Reviewed By: sammccall

Subscribers: kadircet, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D62954

llvm-svn: 363698
clang/include/clang/Tooling/Syntax/Tokens.h
clang/lib/Tooling/Syntax/Tokens.cpp
clang/unittests/Tooling/Syntax/TokensTest.cpp