================ @@ -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) ---------------- HighCommander4 wrote:
It's a bit unfortunate that users have to use different path separators on different platforms in the pattern; it seems like that would inhibit a cross-platform project being able to check in a `.clangd` file containing this configuration key. What do you think about using `convert_to_slash` (similar to [here](https://searchfox.org/llvm/rev/ab6923b9b7a75de79ee06b400ae73771e130339e/clang-tools-extra/clangd/Headers.cpp#301)) to normalize the path to forward-slashes before checking it against the regex? https://github.com/llvm/llvm-project/pull/148371 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits