[clang] [clang-format] Fix working -assume-filename with .clang-format-ignore (PR #113100)

Owen Pan via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 23 23:46:02 PDT 2024


================
@@ -46,5 +46,16 @@
 // CHECK5-NEXT: {{Formatting \[4/5] .*foo\.c}}
 // CHECK5-NOT: foo.js
 
+// RUN: echo "foo.*" > .clang-format-ignore
+// RUN: touch foo.c
+// RUN: echo foo | clang-format -assume-filename=foo.c 2>&1 \
----------------
owenca wrote:

```suggestion
// RUN: echo "int i ;" > foo.c
// RUN: clang-format -assume-filename=foo.c < foo.c \
```

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


More information about the cfe-commits mailing list