sammccall added inline comments.
================
Comment at: clang/lib/Tooling/Syntax/Tokens.cpp:431
+std::vector<TokenBuffer::Expansion>
+TokenBuffer::expansionsAffecting(llvm::ArrayRef<syntax::Token> Spelled) const {
+ if (Spelled.empty())
----------------
ArcsinX wrote:
> Will it be useful to have similar API with FileID/MarkedFile parameter?
> For example, we already have FileID in `SelectionTester::SelectionTester`.
FileID is a bit awkward: then you have to have some way to specify which
expansions you're interested in (or get those for the whole file and filter
them yourself).
We could add an overload for this, but I think
Buf.expansionsAffecting(Buf.spelledTokens(FID)) is pretty acceptable for this
case.
(MarkedFile can't be used in an API because it's private)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84009/new/
https://reviews.llvm.org/D84009
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits