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')"));
52 "Alias for -check-prefix permitting multiple comma separated values"));
134 /// ParsePattern - Parse the given string into the Pattern. Prefix provides
135 /// which prefix is being matched, SM provides the SourceMgr used for error
140 StringRef Prefix,
187 StringRef Prefix,
203 "found empty check string with prefix '" +
204 Prefix + ":'");
620 /// Prefix - Which prefix name this check matched.
621 StringRef Prefix;
636 : Pat(P), Prefix(S), Loc(L) {}
699 // Get the size of the prefix extension.
731 static Check::CheckType FindCheckType(StringRef Buffer, StringRef Prefix) {
732 char NextChar = Buffer[Prefix.size()];
734 // Verify that the : is present after the prefix.
741 StringRef Rest = Buffer.drop_front(Prefix.size() + 1);
773 // Try to find the first match in buffer for any prefix. If a valid match is
774 // found, return that prefix and set its type and location. If there are almost
775 // matches (e.g. the actual prefix string is found, but is not an actual check
778 // string and the location will be StringRef::npos. If one prefix is a substring
792 for (StringRef Prefix : CheckPrefixes) {
793 size_t PrefixLoc = Buffer.find(Prefix);
800 // since a partial match could be a substring of a later, valid prefix.
802 // matching a prefix in a substring later.
809 // If one matching check-prefix is a prefix of another, choose the
811 if (PrefixLoc == FirstLoc && Prefix.size() < FirstPrefix.size())
815 // Make sure we have actually found the prefix, and not a word containing
816 // it. This should also prevent matching the wrong prefix when one is a
821 FirstTy = FindCheckType(Rest, Prefix);
824 FirstPrefix = Prefix;
827 // If the first prefix is invalid, we should continue the search after it.
843 StringRef Prefix = FindFirstCandidateMatch(Buffer, CheckTy, CheckLoc);
845 if (!Prefix.empty()) {
847 return Prefix;
890 std::string Prefix = (Twine("-") + ImplicitCheckNot.ArgStr + "='").str();
893 Prefix + PatternString + Suffix, "command line");
896 CmdLine->getBuffer().substr(Prefix.size(), PatternString.size());
915 // See if a prefix occurs in the memory buffer.
928 // PrefixLoc is to the start of the prefix. Skip to the end.
935 "unsupported -NOT combo on prefix '" + UsedPrefix + "'");
939 // Okay, we found the prefix, yay. Remember the rest of the line, but ignore
989 // prefix as a filler for the error message.
997 errs() << "error: no check strings found with prefix"
1127 SM.PrintMessage(Loc, SourceMgr::DK_Error, Prefix +
1137 SM.PrintMessage(Loc, SourceMgr::DK_Error, Prefix +
1167 Prefix +
1192 Prefix + "-NOT: string occurred!");
1194 Prefix + "-NOT: pattern specified here");
1241 Prefix + "-DAG: found a match of CHECK-DAG"
1245 Prefix + "-DAG: the farthest match of CHECK-DAG"
1248 Prefix + "-NOT: the crossed pattern specified"
1251 Prefix + "-DAG: the reordered pattern specified"
1275 // A check prefix must contain only alphanumeric, hyphens and underscores.
1284 for (StringRef Prefix : CheckPrefixes) {
1286 if (Prefix == "")
1289 if (!PrefixSet.insert(Prefix).second)
1292 if (!ValidateCheckPrefix(Prefix))
1319 errs() << "Supplied check-prefix is invalid! Prefixes must be unique and "