10 #include "llvm/ADT/SmallString.h"
12 using namespace clang;
30 StringRef Glob = UntrimmedGlob.trim(
' ');
32 SmallString<128> RegexText(
"^");
33 StringRef MetaChars(
"()^$|*+?.[]\\{}");
36 RegexText.push_back(
'.');
37 else if (MetaChars.find(C) != StringRef::npos)
38 RegexText.push_back(
'\\');
39 RegexText.push_back(C);
41 RegexText.push_back(
'$');
42 return llvm::Regex(RegexText);
50 Items.push_back(std::move(Item));
51 }
while (!Globs.empty());
55 bool Contains =
false;
56 for (
const GlobListItem &Item : Items) {
57 if (Item.Regex.match(S))
58 Contains = Item.IsPositive;