[PATCH] D67405: Make FormatToken::Type private.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 13 01:22:39 PDT 2019
sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.
This looks fine as it is, adding a side-effect to a function that's called `setType` and is called in lots of places may be hard to reason about.
You haven't mentioned how the interception will be used - if it's possible to express as a simple assignment an then some later operation, it might be clearer.
================
Comment at: clang/lib/Format/FormatToken.h:185
- TokenType Type = TT_Unknown;
+ /// Returns the token's type, e.g. whether "<" is a template opener or
+ /// binary operator.
----------------
Hooray for adding documentation! While here... ;-)
consider moving this documentation to the enum, and elaborating slightly on the relationship between `TokenType` and `TokenKind`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67405/new/
https://reviews.llvm.org/D67405
More information about the cfe-commits
mailing list