[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


================
@@ -707,8 +707,11 @@ int main(int argc, const char **argv) {
     errs() << "Clang-formatting " << LineNo << " files\n";
   }
 
-  if (FileNames.empty())
+  if (FileNames.empty()) {
+    if (!AssumeFileName.empty() && isIgnored(AssumeFileName))
----------------
owenca wrote:

```suggestion
    if (isIgnored(AssumeFileName))
```

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


More information about the cfe-commits mailing list