[PATCH] D147003: [clang-format] JSON Add ability to add a space before the colon

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 28 00:37:15 PDT 2023


MyDeveloperDay marked an inline comment as done.
MyDeveloperDay added inline comments.


================
Comment at: clang/lib/Format/TokenAnnotator.cpp:4155
     if (Right.is(tok::colon))
-      return false;
+      return Style.SpaceBeforeJsonColon;
   } else if (Style.isCSharp()) {
----------------
owenpan wrote:
> Do we need to check if `Left.is(tok::string_literal)`?
Hmm... maybe... I guess I was thinking all colons in JSON are to the right of string literals? 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147003



More information about the cfe-commits mailing list