Examples (5)
Format a file and print the result to `stdout`
clang-format path/to/fileFormat a file in-place
clang-format -i path/to/fileFormat a file using a predefined coding style
clang-format --style LLVM|GNU|Google|Chromium|Microsoft|Mozilla|WebKit path/to/fileFormat a file using the `.clang-format` file in one of the parent directories of the source file
clang-format --style=file path/to/fileGenerate a custom `.clang-format` file
clang-format --style LLVM|GNU|Google|Chromium|Microsoft|Mozilla|WebKit --dump-config > .clang-formatmade by @shridhargupta | data from tldr-pages