[clang-tools-extra] [clang-tidy] Normalize windows line filter paths (PR #217038)

Chris Apple via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 21 09:00:35 PDT 2026


================
@@ -111,6 +111,76 @@ TEST(ClangTidyDiagnosticConsumer, InvalidSourceLocationRangesIgnored) {
   EXPECT_EQ(1ul, Errors[3].Message.Ranges.size());
 }
 
+#ifdef _WIN32
----------------
cjappl wrote:

It is not possible because the `llvm::sys::path::convert_to_slash` only converts forward slashes on windows, otherwise it is a no-op:

https://github.com/llvm/llvm-project/blob/4ccc07bc4d106cbc800be1fa2bb9b0dd456369b5/llvm/lib/Support/Path.cpp#L586

We could manually re-write a helper like this that ALWAYS converts, but I wanted to keep this change scoped as tightly as possible. Open to suggestions.

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


More information about the cfe-commits mailing list