[clang] [clang-format] Add --fail-on-incomplete-format. (PR #84346)

Roberto Bampi via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 20 08:21:43 PDT 2024


================
@@ -0,0 +1,5 @@
+// RUN: cat %s | not clang-format --fail-on-incomplete-format | FileCheck %s
+// RUN: cat %s | clang-format | FileCheck %s
+int a([) {}
+
+// CHECK: int a([) {}
----------------
gigaroby wrote:

> It's missing the EOF. Also, use a single hyphen for the option like other tests.

Done. It took me quite a while but `-style=LLVM` is also required as the .clang-format in the parent directory sets DisableFormat to true. Before I didn't notice because the `cat %s | clang-format` was bypassing the lookup for the config file.

https://github.com/llvm/llvm-project/pull/84346


More information about the cfe-commits mailing list