Home | History | Annotate | Download | only in FileCheck

Lines Matching defs:Pattern

60     cl::desc("Add an implicit negative check with this pattern to every\n"
62 "this pattern occur which are not matched by a positive pattern"),
63 cl::value_desc("pattern"));
79 // Pattern Handling Code.
92 /// MatchEOF - When set, this pattern only matches the end of file. This is
100 class Pattern {
105 /// FixedStr - If non-empty, this pattern is a fixed string match with the
109 /// RegEx - If non-empty, this is a regex pattern.
112 /// \brief Contains the number of line this pattern is in.
116 /// pattern, e.g. "foo[[bar]]baz". In this case, the RegExStr will contain
123 /// E.g. for the pattern "foo[[bar:.*]]baz", VariableDefs will map "bar" to 1.
128 Pattern(Check::CheckType Ty)
134 /// ParsePattern - Parse the given string into the Pattern. Prefix provides
137 /// the pattern string was read. Returns true in case of an error, false
144 /// Match - Match the pattern string against the input buffer Buffer. This
154 /// involving this pattern.
168 /// matching this pattern at the start of \arg Buffer; a distance of zero
186 bool Pattern::ParsePattern(StringRef PatternStr,
226 // Otherwise, there is at least one regex piece. Build up the regex pattern
362 bool Pattern::AddRegExToRegEx(StringRef RS, unsigned &CurParen,
377 void Pattern::AddBackrefToRegEx(unsigned BackrefNum) {
384 bool Pattern::EvaluateExpression(StringRef Expr, std::string &Value) const {
402 /// Match - Match the pattern string against the input buffer Buffer. This
405 size_t Pattern::Match(StringRef Buffer, size_t &MatchLen,
407 // If this is the EOF pattern, match it immediately.
413 // If this is a fixed string pattern, just match it now.
475 unsigned Pattern::ComputeMatchDistance(StringRef Buffer,
493 void Pattern::PrintFailureInfo(const SourceMgr &SM, StringRef Buffer,
545 // looking for something which looks like a pattern.
572 size_t Pattern::FindRegexVarEnd(StringRef Str, SourceMgr &SM) {
617 /// Pat - The pattern to match.
618 Pattern Pat;
633 std::vector<Pattern> DagNotStrings;
635 CheckString(const Pattern &P, StringRef S, SMLoc L)
650 const std::vector<const Pattern *> &NotStrings,
655 std::vector<const Pattern *> &NotStrings,
886 std::vector<Pattern> ImplicitNegativeChecks;
899 ImplicitNegativeChecks.push_back(Pattern(Check::CheckNot));
905 std::vector<Pattern> DagNotMatches = ImplicitNegativeChecks;
946 // Remember the location of the start of the pattern, for diagnostics.
949 // Parse the pattern.
950 Pattern P(CheckTy);
988 // Add an EOF pattern for any trailing CHECK-DAG/-NOTs, and use the first
991 CheckStrings.emplace_back(Pattern(Check::CheckEOF), *CheckPrefixes.begin(),
1016 const Pattern &Pat, StringRef Buffer,
1029 // Allow the pattern to print additional information if desired.
1067 std::vector<const Pattern *> NotStrings;
1180 const std::vector<const Pattern *> &NotStrings,
1182 for (const Pattern *Pat : NotStrings) {
1194 Prefix + "-NOT: pattern specified here");
1202 std::vector<const Pattern *> &NotStrings,
1210 for (const Pattern &Pat : DagNotStrings) {
1248 Prefix + "-NOT: the crossed pattern specified"
1251 Prefix + "-DAG: the reordered pattern specified"