llvm-project/clang
mydeveloperday 95b3947111 [clang-format] JSON formatting add new option for controlling newlines in json arrays
Working in a mixed environment of both vscode/vim with a team configured prettier configuration, this can leave clang-format and prettier fighting each other over the formatting of arrays, both simple arrays of elements.

This review aims to add some "control knobs" to the Json formatting in clang-format to help align the two tools so they can be used interchangeably.

This will allow simply arrays `[1, 2, 3]` to remain on a single line but will break those arrays based on context within that array.

Happy to change the name of the option (this is the third name I tried)

Reviewed By: HazardyKnusperkeks, owenpan

Differential Revision: https://reviews.llvm.org/D133589
2022-09-19 17:54:39 +01:00
..
bindings Fixed a number of typos 2022-08-01 13:13:18 -04:00
cmake [CMake] Avoid `LLVM_BINARY_DIR` when other more specific variable are better-suited, part 2 2022-09-14 15:48:58 -04:00
docs [clang-format] JSON formatting add new option for controlling newlines in json arrays 2022-09-19 17:54:39 +01:00
examples
include [clang-format] JSON formatting add new option for controlling newlines in json arrays 2022-09-19 17:54:39 +01:00
lib [clang-format] JSON formatting add new option for controlling newlines in json arrays 2022-09-19 17:54:39 +01:00
runtime Revert "[cmake] Use `CMAKE_INSTALL_LIBDIR` too" 2022-08-18 22:46:32 -04:00
test [clang] Allow vector of BitInt 2022-09-19 09:26:56 -07:00
tools [cc1as] Support --compress-debug-sections=zstd 2022-09-08 16:31:45 -07:00
unittests [clang-format] JSON formatting add new option for controlling newlines in json arrays 2022-09-19 17:54:39 +01:00
utils [clang][Interp] Implement function calls 2022-09-08 07:31:07 +02:00
www Add additional test coverage for C2x N2508 2022-09-19 07:52:07 -04:00
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt [cmake] do not set execution permission to regular files. 2022-09-07 11:04:12 +08:00
CodeOwners.rst Update the clang and clang-tools-extra code owners files 2022-09-06 08:28:03 -04:00
INSTALL.txt
LICENSE.TXT
ModuleInfo.txt
NOTES.txt
README.txt

README.txt

//===----------------------------------------------------------------------===//
// C Language Family Front-end
//===----------------------------------------------------------------------===//

Welcome to Clang.  This is a compiler front-end for the C family of languages
(C, C++, Objective-C, and Objective-C++) which is built as part of the LLVM
compiler infrastructure project.

Unlike many other compiler frontends, Clang is useful for a number of things
beyond just compiling code: we intend for Clang to be host to a number of
different source-level tools.  One example of this is the Clang Static Analyzer.

If you're interested in more (including how to build Clang) it is best to read
the relevant web sites.  Here are some pointers:

Information on Clang:             http://clang.llvm.org/
Building and using Clang:         http://clang.llvm.org/get_started.html
Clang Static Analyzer:            http://clang-analyzer.llvm.org/
Information on the LLVM project:  http://llvm.org/

If you have questions or comments about Clang, a great place to discuss them is
on the Clang forums:
  https://discourse.llvm.org/c/clang/

If you find a bug in Clang, please file it in the LLVM bug tracker:
  http://llvm.org/bugs/