[clang-tools-extra] [clang-tidy] Fix clang-tidy-diff with not producing blank lines (PR #213873)
Baranov Victor via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 4 07:37:51 PDT 2026
================
@@ -9,6 +9,14 @@
// RUN: not diff -U0 %s %t.cpp | %clang_tidy_diff -checks=-*,modernize-use-override -j 1 -- -std=c++11 2>&1 | FileCheck %s --check-prefix=CHECK-J1
// CHECK-J1: Running clang-tidy in 1 threads...
+
+// Test that running over multiple files don't produce blank lines in output
+// RUN: not diff -U0 %s %t.cpp > %t.diff
+// RUN: sed 's/PLACEHOLDER/a + b + 0/' %S/Inputs/clang-tidy-diff/test.cpp > %t.clean.cpp
+// RUN: not diff -U0 %S/Inputs/clang-tidy-diff/test.cpp %t.clean.cpp > %t.clean.diff
+// RUN: cat %t.clean.diff %t.diff | %clang_tidy_diff -checks=-*,modernize-use-override -j 1 -- -std=c++11 2>&1 | FileCheck %s --check-prefix=CHECK-NOBLANK
+// CHECK-NOBLANK: Running clang-tidy in 1 threads...
+// CHECK-NOBLANK-NEXT: :8: warning: annotate this
----------------
vbvictor wrote:
The test actually failing without the fix
https://github.com/llvm/llvm-project/pull/213873
More information about the cfe-commits
mailing list