clang-format playground¶
Paste C or C++ code, pick an LLVM version and a style, and see what clang-format changes. clang-format runs in your browser as WebAssembly, so your code is not sent anywhere.
What clang-format changes
Loading clang-format…
Run the same check
These use the version and style picked above.
.pre-commit-config.yaml with cpp-linter-hooks
Save the configuration above as .clang-format in the root of your repository first.
The WebAssembly builds of clang-format come from the @wasm-fmt/clang-format npm package and are loaded from jsDelivr when you open this page. Their patch release can differ from the one cpp-linter installs for the same LLVM version. The playground has no clang-tidy: it needs the compile flags and headers of a real build.