[clang-format] Hanlde leading whitespaces for JSON files
authorOwen Pan <owenpiano@gmail.com>
Thu, 20 Apr 2023 03:10:00 +0000 (20:10 -0700)
committerOwen Pan <owenpiano@gmail.com>
Thu, 20 Apr 2023 11:31:55 +0000 (04:31 -0700)
commit51f6a16646b76152d1b91ed68d018d306f7ab2fc
treeba744967cf847eaf2d3ddea4999efd82786765df
parentcc7bb7080fc8e6f4d217e7f9b971fbdbf091f9e7
[clang-format] Hanlde leading whitespaces for JSON files

Fixes #62228.
Fixes #62229.

Differential Revision: https://reviews.llvm.org/D148777
clang/lib/Format/Format.cpp
clang/unittests/Format/FormatTestJson.cpp