[clang-tools-extra] Use resolved path when filtering in IncludeInserter (PR #148371)

via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 6 14:13:46 PDT 2025


================
@@ -344,6 +344,21 @@ TEST_F(HeadersTest, ShortenIncludesInSearchPathBracketed) {
   EXPECT_EQ(calculate(BarHeader), "<sub/bar.h>");
 }
 
+TEST_F(HeadersTest, ShortenIncludesInSearchPathBracketedFilterByFullPath) {
+  // The filter receives the full path of the header, so it is able to filter by
+  // the parent directory, even if it is part of the include search path
+  AngledHeaders.push_back([](auto Path) {
+#if defined(_WIN32)
----------------
Harald-R wrote:

Good point! Made the change.

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


More information about the cfe-commits mailing list