[PATCH] D120511: [clang-format] Allow to set token types final

Marek Kurdej via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 24 13:17:24 PST 2022


curdeius accepted this revision.
curdeius added a subscriber: krasimir.
curdeius added a comment.
This revision is now accepted and ready to land.

Great!
@krasimir, FYI, that should fix the issue you reported.



================
Comment at: clang/lib/Format/FormatToken.h:379
+  void setFinalizedType(TokenType T) {
+    Type = T;
+    TypeIsFinalized = true;
----------------
Maybe we should assert here and in `setType` that: `assert(!TypeIsFinalized);`?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120511/new/

https://reviews.llvm.org/D120511



More information about the cfe-commits mailing list