[clang] [llvm] [NFCI][Sanitizer] Convert Matcher::Globs from StringMap to vector. (PR #140964)
Qinkun Bao via cfe-commits
cfe-commits at lists.llvm.org
Fri May 23 11:16:44 PDT 2025
qinkunbao wrote:
This PR change converts Matcher::Globs from StringMap to vector. However, after the change, some unit tests are broken.
For example,
```
// build/unittests/Support/./SupportTests --gtest_filter=SpecialCaseListTest.Basic
TEST_F(SpecialCaseListTest, Basic) {
std::unique_ptr<SpecialCaseList> SCL =
makeSpecialCaseList("# This is a comment.\n"
"\n"
"src:hello\n"
"src:bye\n"
"src:hi=category\n"
"src:z*=category\n");
EXPECT_TRUE(SCL->inSection("", "src", "hello"));
}
```
Investigation revealed that `bool GlobPattern::match(StringRef S)` fails to match the input "hello". Logs indicate a change in the `Prefix` within `GlobPattern` from "hello" to "hilo" at some points.
https://github.com/llvm/llvm-project/pull/140964
More information about the cfe-commits
mailing list