[PATCH] D59887: [Syntax] Introduce TokenBuffer, start clangToolingSyntax library
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 29 01:57:48 PDT 2019
ilya-biryukov marked 2 inline comments as done.
ilya-biryukov added a comment.
A few naming alternatives, will update the review after addressing other comments.
================
Comment at: clang/include/clang/Tooling/Syntax/TokenBuffer.h:72
+ /// macro or a name, arguments and parentheses of a function-like macro.
+ llvm::ArrayRef<syntax::Token> macroTokens(const TokenBuffer &B) const;
+ /// The range covering macroTokens().
----------------
gribozavr wrote:
> `invocationTokens` or `macroInvocationTokens`
The plan is to eventually include the macro directives tokens, hence the name.
`invocationTokens` are somewhat inaccurate in that case, can't come up with a better name.
================
Comment at: clang/include/clang/Tooling/Syntax/TokenBuffer.h:74
+ /// The range covering macroTokens().
+ std::pair<unsigned, unsigned> macroRange(const TokenBuffer &B,
+ const SourceManager &SM) const;
----------------
gribozavr wrote:
> `invocationSourceRange` or `macroInvocationSourceRange` depending on what you choose for the function above.
>
WDYT about `range`?
Given the name of the parent class, this should be unambiguous.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59887/new/
https://reviews.llvm.org/D59887
More information about the cfe-commits
mailing list