Home | History | Annotate | Download | only in FileCheck

Lines Matching full:match

1 //===- FileCheck.cpp - Check that File's Contents match what is expected --===//
59 /// FixedStr - If non-empty, this pattern is a fixed string match with the
84 /// Match - Match the pattern string against the input buffer Buffer. This
85 /// returns the position that is matched or npos if there is no match. If
86 /// there is a match, the size of the matched string is returned in MatchLen.
89 /// variables and is updated if this match defines new values.
90 size_t Match(StringRef Buffer, size_t &MatchLen,
93 /// PrintFailureInfo - Print additional information about a failure to match
104 /// should correspond to a perfect match.
144 // Otherwise, this is the start of a regex match. Scan for the }}.
282 /// Match - Match the pattern string against the input buffer Buffer. This
283 /// returns the position that is matched or npos if there is no match. If
284 /// there is a match, the size of the matched string is returned in MatchLen.
285 size_t Pattern::Match(StringRef Buffer, size_t &MatchLen,
287 // If this is the EOF pattern, match it immediately.
293 // If this is a fixed string pattern, just match it now.
299 // Regex match.
326 // Match the newly constructed regex.
332 if (!Regex(RegExToMatch, Regex::Newline).match(Buffer, &MatchInfo))
335 // Successful regex match.
336 assert(!MatchInfo.empty() && "Didn't get any match");
394 // Attempt to find the closest/best fuzzy match. Usually an error happens
395 // because some string in the output didn't exactly match. In these cases, we
412 // Compute the "quality" of this match as an arbitrary combination of the
413 // match distance and the number of lines skipped to get to this match.
423 // Print the "possible intended match here" line if we found something
428 SourceMgr::DK_Note, "possible intended match here");
430 // FIXME: If we wanted to be really friendly we would show why the match
441 /// Pat - The pattern to match.
444 /// Loc - The location in the match file that the check string was specified.
452 /// occurring between this match string and the previous one (or start of
525 // If we didn't find a match, we're done.
697 size_t MatchPos = CheckStr.Pat.Match(Buffer, MatchLen, VariableTable);
700 // If we didn't find a match, reject the input.
708 // If this check is a "CHECK-NEXT", verify that the previous match was on
711 // Count the number of newlines between the previous match and this one.
718 CheckPrefix+"-NEXT: is on the same line as previous match");
720 SourceMgr::DK_Note, "'next' match was here");
722 "previous match was here");
728 "-NEXT: is not on the line after the previous match");
730 SourceMgr::DK_Note, "'next' match was here");
732 "previous match was here");
737 // If this match had "not strings", verify that they don't exist in the
742 size_t Pos = CheckStr.NotStrings[ChunkNo].second.Match(SkippedRegion,
756 // the position after the match as the end of the last match.