[clang-format] Don't rewrite the input file if already formatted
authorOwen Pan <owenpiano@gmail.com>
Sat, 11 Feb 2023 23:20:38 +0000 (15:20 -0800)
committerOwen Pan <owenpiano@gmail.com>
Tue, 14 Feb 2023 22:27:53 +0000 (14:27 -0800)
commitb4243bb611a30137f3f1a7f0e531f91d331ab4be
tree18004ed2700ebdd2741ddef46f0c8d62fcaa72c2
parented3e3ee9e30dfbffd2170a770a49b36a7f444916
[clang-format] Don't rewrite the input file if already formatted

If IntegerLiteralSeparator is set but the integer literals are
already formatted, don't rewrite the input file.

Fixes #60651.

Differential Revision: https://reviews.llvm.org/D143831
clang/lib/Format/IntegerLiteralSeparatorFixer.cpp