[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:03 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 \
+// RUN:   | FileCheck %s -check-prefix=CHECK6 -allow-empty
+// CHECK6-NOT: foo
----------------
owenca wrote:

```suggestion
// CHECK6-NOT: int
```

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


More information about the cfe-commits mailing list