![]() Relevant issue: https://github.com/llvm/llvm-project/issues/52705 When the `DisableFormat` option of `clang-format` is set to `true` and a JSON file is formatted, the ephemeral variable binding that is added to the top-level object is not removed from the formatted file. For example, this JSON: ``` { "key": "value" } ``` Is reformatted to: ``` x = { "key": "value" } ``` Which is not valid JSON syntax. This fix avoids the addition of this binding when `DisableFormat` is set to `true`, ensuring that it cannot be left behind when formatting is disabled. Reviewed By: MyDeveloperDay, HazardyKnusperkeks Differential Revision: https://reviews.llvm.org/D115769 Fixes #52705 |
||
---|---|---|
.. | ||
fuzzer | ||
CMakeLists.txt | ||
ClangFormat.cpp | ||
clang-format-bbedit.applescript | ||
clang-format-diff.py | ||
clang-format-sublime.py | ||
clang-format-test.el | ||
clang-format.el | ||
clang-format.py | ||
git-clang-format |