Home | History | Annotate | Download | only in FileCheck

Lines Matching defs:Pattern

53 // Pattern Handling Code.
56 class Pattern {
59 /// MatchEOF - When set, this pattern only matches the end of file. This is
63 /// FixedStr - If non-empty, this pattern is a fixed string match with the
67 /// RegEx - If non-empty, this is a regex pattern.
70 /// \brief Contains the number of line this pattern is in.
74 /// pattern, e.g. "foo[[bar]]baz". In this case, the RegExStr will contain
81 /// E.g. for the pattern "foo[[bar:.*]]baz", VariableDefs will map "bar" to 1.
86 Pattern(bool matchEOF = false) : MatchEOF(matchEOF) { }
88 /// ParsePattern - Parse the given string into the Pattern. SM provides the
90 /// the input file from which the pattern string was read.
94 /// Match - Match the pattern string against the input buffer Buffer. This
104 /// involving this pattern.
114 /// matching this pattern at the start of \arg Buffer; a distance of zero
132 bool Pattern::ParsePattern(StringRef PatternStr, SourceMgr &SM,
162 // Otherwise, there is at least one regex piece. Build up the regex pattern
292 void Pattern::AddFixedStringToRegEx(StringRef FixedStr, std::string &TheStr) {
319 bool Pattern::AddRegExToRegEx(StringRef RS, unsigned &CurParen,
334 void Pattern::AddBackrefToRegEx(unsigned BackrefNum) {
341 bool Pattern::EvaluateExpression(StringRef Expr, std::string &Value) const {
359 /// Match - Match the pattern string against the input buffer Buffer. This
362 size_t Pattern::Match(StringRef Buffer, size_t &MatchLen,
364 // If this is the EOF pattern, match it immediately.
370 // If this is a fixed string pattern, just match it now.
434 unsigned Pattern::ComputeMatchDistance(StringRef Buffer,
452 void Pattern::PrintFailureInfo(const SourceMgr &SM, StringRef Buffer,
504 // looking for something which looks like a pattern.
531 size_t Pattern::FindRegexVarEnd(StringRef Str) {
571 /// Pat - The pattern to match.
572 Pattern Pat;
584 std::vector<std::pair<SMLoc, Pattern> > NotStrings;
586 CheckString(const Pattern &P, SMLoc L, bool isCheckNext)
652 std::vector<std::pair<SMLoc, Pattern> > NotMatches;
698 // Remember the location of the start of the pattern, for diagnostics.
701 // Parse the pattern.
702 Pattern P;
731 // Add an EOF pattern for any trailing CHECK-NOTs.
733 CheckStrings.push_back(CheckString(Pattern(true),
762 // Allow the pattern to print additional information if desired.
888 CheckPrefix+"-NOT: pattern specified here");