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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits