This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGaf98f3b1f4db: [clang-format] JSON Add ability to add a space
before the colon (authored by MyDeveloperDay).
Repository:
rG LLVM Github Monorepo
C
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:
> MyDeveloperDay wrote:
> > o
MyDeveloperDay updated this revision to Diff 509439.
MyDeveloperDay marked 2 inline comments as done.
MyDeveloperDay added a comment.
add missing unit test
let's go defensive on the JsColon detection
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147003/new/
https://reviews.llvm.org/D147
owenpan 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()) {
MyDeveloperDay wrote:
> owenpan wrote:
> > Do we ne
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 added a comment.
You need to add `CHECK_PARSE_BOOL(SpaceBeforeJsonColon)` in ConfigParseTest.cpp.
Comment at: clang/include/clang/Format/Format.h:3717
+ /// If ``true``, a space will be add before a json colon
+ /// \code
Commen
MyDeveloperDay created this revision.
MyDeveloperDay added reviewers: owenpan, HazardyKnusperkeks, rymiel.
MyDeveloperDay added projects: clang, clang-format.
Herald added a project: All.
MyDeveloperDay requested review of this revision.
I've seen a couple of request for extra Json formatting to m