Home | History | Annotate | Download | only in FileCheck

Lines Matching refs:Prefix

46 CheckPrefixes("check-prefix",
47 cl::desc("Prefix to use from check file (defaults to 'CHECK')"));
108 /// ParsePattern - Parse the given string into the Pattern. Prefix provides
109 /// which prefix is being matched, SM provides the SourceMgr used for error
114 StringRef Prefix,
161 StringRef Prefix,
175 "found empty check string with prefix '" +
176 Prefix + ":'");
582 /// Prefix - Which prefix name this check matched.
583 StringRef Prefix;
602 : Pat(P), Prefix(S), Loc(L), CheckTy(Ty) {}
665 // Get the size of the prefix extension.
693 static Check::CheckType FindCheckType(StringRef Buffer, StringRef Prefix) {
694 char NextChar = Buffer[Prefix.size()];
696 // Verify that the : is present after the prefix.
703 StringRef Rest = Buffer.drop_front(Prefix.size() + 1);
726 // Try to find the first match in buffer for any prefix. If a valid match is
727 // found, return that prefix and set its type and location. If there are almost
728 // matches (e.g. the actual prefix string is found, but is not an actual check
731 // string and the location will be StringRef::npos. If one prefix is a substring
747 StringRef Prefix(*I);
748 size_t PrefixLoc = Buffer.find(Prefix);
755 // since a partial match could be a substring of a later, valid prefix.
757 // matching a prefix in a substring later.
764 // If one matching check-prefix is a prefix of another, choose the
766 if (PrefixLoc == FirstLoc && Prefix.size() < FirstPrefix.size())
770 // Make sure we have actually found the prefix, and not a word containing
771 // it. This should also prevent matching the wrong prefix when one is a
776 FirstTy = FindCheckType(Rest, Prefix);
779 FirstPrefix = Prefix;
782 // If the first prefix is invalid, we should continue the search after it.
798 StringRef Prefix = FindFirstCandidateMatch(Buffer, CheckTy, CheckLoc);
800 if (!Prefix.empty()) {
802 return Prefix;
850 // See if a prefix occurs in the memory buffer.
863 // PrefixLoc is to the start of the prefix. Skip to the end.
866 // Okay, we found the prefix, yay. Remember the rest of the line, but ignore
916 // prefix as a filler for the error message.
926 errs() << "error: no check strings found with prefix"
929 StringRef Prefix(CheckPrefixes[I]);
930 errs() << '\'' << Prefix << ":'";
1050 SM.PrintMessage(Loc, SourceMgr::DK_Error, Prefix +
1060 SM.PrintMessage(Loc, SourceMgr::DK_Error, Prefix +
1089 Prefix + "-NOT: string occurred!");
1091 Prefix + "-NOT: pattern specified here");
1141 Prefix + "-DAG: found a match of CHECK-DAG"
1145 Prefix + "-DAG: the farthest match of CHECK-DAG"
1148 Prefix + "-NOT: the crossed pattern specified"
1151 Prefix + "-DAG: the reordered pattern specified"
1175 // A check prefix must contain only alphanumeric, hyphens and underscores.
1186 StringRef Prefix(*I);
1188 if (!PrefixSet.insert(Prefix))
1191 if (!ValidateCheckPrefix(Prefix))
1211 errs() << "Supplied check-prefix is invalid! Prefixes must be unique and "