This enables us to intercept changes to the token type via setType(), which
is a precondition for being able to use multi-pass formatting for macro
arguments.
Details
Details
- Reviewers
sammccall - Commits
- rG53cc90f78999: Make FormatToken::Type private.
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 37965 Build 37964: arc lint + arc unit
Event Timeline
Comment Actions
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.
clang/lib/Format/FormatToken.h | ||
---|---|---|
185 | Hooray for adding documentation! While here... ;-) consider moving this documentation to the enum, and elaborating slightly on the relationship between TokenType and TokenKind |
Hooray for adding documentation! While here... ;-)
consider moving this documentation to the enum, and elaborating slightly on the relationship between TokenType and TokenKind