Lines Matching defs:Prefix
764 bool Pattern::parsePattern(StringRef PatternStr, StringRef Prefix,
778 "found empty check string with prefix '" + Prefix + ":'");
785 "found non-empty check string for empty check with prefix '" + Prefix +
1494 std::string Check::FileCheckType::getDescription(StringRef Prefix) const {
1496 auto WithModifiers = [this, Prefix](StringRef Str) -> std::string {
1497 return (Prefix + Str + getModifiersDescription()).str();
1522 return std::string(Prefix);
1534 FindCheckType(const FileCheckRequest &Req, StringRef Buffer, StringRef Prefix,
1536 if (Buffer.size() <= Prefix.size())
1539 StringRef Rest = Buffer.drop_front(Prefix.size());
1541 if (llvm::is_contained(Req.CommentPrefixes, Prefix)) {
1624 FindCheckType(const FileCheckRequest &Req, StringRef Buffer, StringRef Prefix) {
1626 auto Res = FindCheckType(Req, Buffer, Prefix, Misspelled);
1644 for (const char *Prefix : DefaultCheckPrefixes)
1645 Req.CheckPrefixes.push_back(Prefix);
1649 for (const char *Prefix : DefaultCommentPrefixes)
1650 Req.CommentPrefixes.push_back(Prefix);
1661 for (StringRef Prefix : CheckPrefixes)
1662 Prefixes.push_back({Prefix, Input.find(Prefix)});
1663 for (StringRef Prefix : CommentPrefixes)
1664 Prefixes.push_back({Prefix, Input.find(Prefix)});
1680 for (auto &[Prefix, Pos] : Prefixes) {
1683 Pos = Input.find(Prefix, From);
1687 Match = StringRef(Input.substr(Pos, Prefix.size()));
1722 StringRef Prefix = Matcher.match(Buffer);
1723 if (Prefix.empty())
1727 assert(Prefix.data() >= Buffer.data() &&
1728 Prefix.data() < Buffer.data() + Buffer.size() &&
1729 "Prefix doesn't start inside of buffer!");
1730 size_t Loc = Prefix.data() - Buffer.data();
1743 std::tie(CheckTy, AfterSuffix) = FindCheckType(Req, Buffer, Prefix);
1747 return {Prefix, AfterSuffix};
1753 Buffer = Buffer.drop_front(SkipWord(Buffer, Prefix.size()));
1793 std::string Prefix = "-implicit-check-not='";
1796 (Prefix + PatternString + Suffix).str(), "command line");
1799 CmdLine->getBuffer().substr(Prefix.size(), PatternString.size());
1977 StringRef Prefix, SMLoc Loc, const Pattern &Pat,
2014 Pat.getCheckTy().getDescription(Prefix),
2047 StringRef Prefix, SMLoc Loc, const Pattern &Pat,
2106 Pat.getCheckTy().getDescription(Prefix),
2130 StringRef Prefix, SMLoc Loc, const Pattern &Pat,
2136 return printMatch(ExpectedMatch, SM, Prefix, Loc, Pat, MatchedCount, Buffer,
2138 return printNoMatch(ExpectedMatch, SM, Prefix, Loc, Pat, MatchedCount, Buffer,
2196 if (Error Err = reportMatchResult(/*ExpectedMatch=*/true, SM, Prefix, Loc,
2253 Prefix +
2296 Prefix +
2471 for (StringRef Prefix : SuppliedPrefixes) {
2472 if (Prefix.empty()) {
2478 if (!Validator.match(Prefix)) {
2481 << "underscores: '" << Prefix << "'\n";
2484 if (!UniquePrefixes.insert(Prefix).second) {
2486 << "check and comment prefixes: '" << Prefix << "'\n";
2497 for (const char *Prefix : DefaultCheckPrefixes)
2498 UniquePrefixes.insert(Prefix);
2501 for (const char *Prefix : DefaultCommentPrefixes)
2502 UniquePrefixes.insert(Prefix);