Lines Matching refs:SM
115 SourceMgr &SM,
129 void PrintFailureInfo(const SourceMgr &SM, StringRef Buffer,
138 bool AddRegExToRegEx(StringRef RS, unsigned &CurParen, SourceMgr &SM);
156 size_t FindRegexVarEnd(StringRef Str, SourceMgr &SM);
162 SourceMgr &SM, in ParsePattern() argument
174 SM.PrintMessage(PatternLoc, SourceMgr::DK_Error, in ParsePattern()
200 SM.PrintMessage(SMLoc::getFromPointer(PatternStr.data()), in ParsePattern()
213 if (AddRegExToRegEx(PatternStr.substr(2, End-2), CurParen, SM)) in ParsePattern()
229 size_t End = FindRegexVarEnd(PatternStr.substr(2), SM); in ParsePattern()
232 SM.PrintMessage(SMLoc::getFromPointer(PatternStr.data()), in ParsePattern()
246 SM.PrintMessage(SMLoc::getFromPointer(Name.data()), SourceMgr::DK_Error, in ParsePattern()
258 SM.PrintMessage(SMLoc::getFromPointer(Name.data()), in ParsePattern()
268 SM.PrintMessage(SMLoc::getFromPointer(Name.data()+i), in ParsePattern()
276 SM.PrintMessage(SMLoc::getFromPointer(Name.data()), SourceMgr::DK_Error, in ParsePattern()
288 SM.PrintMessage(SMLoc::getFromPointer(Name.data()), in ParsePattern()
305 if (AddRegExToRegEx(MatchStr.substr(NameEnd+1), CurParen, SM)) in ParsePattern()
323 SourceMgr &SM) { in AddRegExToRegEx() argument
327 SM.PrintMessage(SMLoc::getFromPointer(RS.data()), SourceMgr::DK_Error, in AddRegExToRegEx()
455 void Pattern::PrintFailureInfo(const SourceMgr &SM, StringRef Buffer, in PrintFailureInfo() argument
488 SM.PrintMessage(SMLoc::getFromPointer(Buffer.data()), SourceMgr::DK_Note, in PrintFailureInfo()
526 SM.PrintMessage(SMLoc::getFromPointer(Buffer.data() + Best), in PrintFailureInfo()
534 size_t Pattern::FindRegexVarEnd(StringRef Str, SourceMgr &SM) { in FindRegexVarEnd() argument
556 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), in FindRegexVarEnd()
605 size_t Check(const SourceMgr &SM, StringRef Buffer, bool IsLabelScanMode,
609 bool CheckNext(const SourceMgr &SM, StringRef Buffer) const;
612 bool CheckNot(const SourceMgr &SM, StringRef Buffer,
617 size_t CheckDag(const SourceMgr &SM, StringRef Buffer,
821 static bool ReadCheckFile(SourceMgr &SM, in ReadCheckFile() argument
836 SM.AddNewSourceBuffer(F, SMLoc()); in ReadCheckFile()
878 if (P.ParsePattern(Buffer.substr(0, EOL), UsedPrefix, SM, LineNumber)) in ReadCheckFile()
883 SM.PrintMessage(SMLoc::getFromPointer(UsedPrefixStart), in ReadCheckFile()
894 SM.PrintMessage(SMLoc::getFromPointer(UsedPrefixStart), in ReadCheckFile()
942 static void PrintCheckFailed(const SourceMgr &SM, const SMLoc &Loc, in PrintCheckFailed() argument
946 SM.PrintMessage(Loc, SourceMgr::DK_Error, in PrintCheckFailed()
953 SM.PrintMessage(SMLoc::getFromPointer(Buffer.data()), SourceMgr::DK_Note, in PrintCheckFailed()
957 Pat.PrintFailureInfo(SM, Buffer, VariableTable); in PrintCheckFailed()
960 static void PrintCheckFailed(const SourceMgr &SM, const CheckString &CheckStr, in PrintCheckFailed() argument
963 PrintCheckFailed(SM, CheckStr.Loc, CheckStr.Pat, Buffer, VariableTable); in PrintCheckFailed()
990 size_t CheckString::Check(const SourceMgr &SM, StringRef Buffer, in Check() argument
1002 LastPos = CheckDag(SM, Buffer, NotStrings, VariableTable); in Check()
1011 PrintCheckFailed(SM, *this, MatchBuffer, VariableTable); in Check()
1023 if (CheckNext(SM, SkippedRegion)) in Check()
1028 if (CheckNot(SM, SkippedRegion, NotStrings, VariableTable)) in Check()
1035 bool CheckString::CheckNext(const SourceMgr &SM, StringRef Buffer) const { in CheckNext() argument
1041 SM.getMemoryBuffer( in CheckNext()
1042 SM.FindBufferContainingLoc( in CheckNext()
1050 SM.PrintMessage(Loc, SourceMgr::DK_Error, Prefix + in CheckNext()
1052 SM.PrintMessage(SMLoc::getFromPointer(Buffer.end()), in CheckNext()
1054 SM.PrintMessage(SMLoc::getFromPointer(Buffer.data()), SourceMgr::DK_Note, in CheckNext()
1060 SM.PrintMessage(Loc, SourceMgr::DK_Error, Prefix + in CheckNext()
1062 SM.PrintMessage(SMLoc::getFromPointer(Buffer.end()), in CheckNext()
1064 SM.PrintMessage(SMLoc::getFromPointer(Buffer.data()), SourceMgr::DK_Note, in CheckNext()
1066 SM.PrintMessage(SMLoc::getFromPointer(FirstNewLine), SourceMgr::DK_Note, in CheckNext()
1074 bool CheckString::CheckNot(const SourceMgr &SM, StringRef Buffer, in CheckNot() argument
1087 SM.PrintMessage(SMLoc::getFromPointer(Buffer.data()+Pos), in CheckNot()
1090 SM.PrintMessage(Pat->getLoc(), SourceMgr::DK_Note, in CheckNot()
1098 size_t CheckString::CheckDag(const SourceMgr &SM, StringRef Buffer, in CheckDag() argument
1130 PrintCheckFailed(SM, Pat.getLoc(), Pat, MatchBuffer, VariableTable); in CheckDag()
1139 SM.PrintMessage(SMLoc::getFromPointer(Buffer.data() + MatchPos), in CheckDag()
1143 SM.PrintMessage(SMLoc::getFromPointer(Buffer.data() + LastPos), in CheckDag()
1147 SM.PrintMessage(NotStrings[0]->getLoc(), SourceMgr::DK_Note, in CheckDag()
1150 SM.PrintMessage(Pat.getLoc(), SourceMgr::DK_Note, in CheckDag()
1162 if (CheckNot(SM, SkippedRegion, NotStrings, VariableTable)) in CheckDag()
1219 SourceMgr SM; in main() local
1223 if (ReadCheckFile(SM, CheckStrings)) in main()
1246 SM.AddNewSourceBuffer(F, SMLoc()); in main()
1272 size_t MatchLabelPos = CheckLabelStr.Check(SM, Buffer, true, in main()
1290 size_t MatchPos = CheckStr.Check(SM, CheckRegion, false, MatchLen, in main()