Lines Matching refs:SM

128                     SourceMgr &SM,
142 void PrintFailureInfo(const SourceMgr &SM, StringRef Buffer,
151 bool AddRegExToRegEx(StringRef RS, unsigned &CurParen, SourceMgr &SM);
169 size_t FindRegexVarEnd(StringRef Str, SourceMgr &SM);
175 SourceMgr &SM, in ParsePattern() argument
187 SM.PrintMessage(PatternLoc, SourceMgr::DK_Error, in ParsePattern()
213 SM.PrintMessage(SMLoc::getFromPointer(PatternStr.data()), in ParsePattern()
226 if (AddRegExToRegEx(PatternStr.substr(2, End-2), CurParen, SM)) in ParsePattern()
242 size_t End = FindRegexVarEnd(PatternStr.substr(2), SM); in ParsePattern()
245 SM.PrintMessage(SMLoc::getFromPointer(PatternStr.data()), in ParsePattern()
259 SM.PrintMessage(SMLoc::getFromPointer(Name.data()), SourceMgr::DK_Error, in ParsePattern()
271 SM.PrintMessage(SMLoc::getFromPointer(Name.data()), in ParsePattern()
281 SM.PrintMessage(SMLoc::getFromPointer(Name.data()+i), in ParsePattern()
289 SM.PrintMessage(SMLoc::getFromPointer(Name.data()), SourceMgr::DK_Error, in ParsePattern()
301 SM.PrintMessage(SMLoc::getFromPointer(Name.data()), in ParsePattern()
318 if (AddRegExToRegEx(MatchStr.substr(NameEnd+1), CurParen, SM)) in ParsePattern()
336 SourceMgr &SM) { in AddRegExToRegEx() argument
340 SM.PrintMessage(SMLoc::getFromPointer(RS.data()), SourceMgr::DK_Error, in AddRegExToRegEx()
466 void Pattern::PrintFailureInfo(const SourceMgr &SM, StringRef Buffer, in PrintFailureInfo() argument
499 SM.PrintMessage(SMLoc::getFromPointer(Buffer.data()), SourceMgr::DK_Note, in PrintFailureInfo()
537 SM.PrintMessage(SMLoc::getFromPointer(Buffer.data() + Best), in PrintFailureInfo()
545 size_t Pattern::FindRegexVarEnd(StringRef Str, SourceMgr &SM) { in FindRegexVarEnd() argument
567 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), in FindRegexVarEnd()
616 size_t Check(const SourceMgr &SM, StringRef Buffer, bool IsLabelScanMode,
620 bool CheckNext(const SourceMgr &SM, StringRef Buffer) const;
623 bool CheckSame(const SourceMgr &SM, StringRef Buffer) const;
626 bool CheckNot(const SourceMgr &SM, StringRef Buffer,
631 size_t CheckDag(const SourceMgr &SM, StringRef Buffer,
836 static bool ReadCheckFile(SourceMgr &SM, in ReadCheckFile() argument
854 SM.AddNewSourceBuffer(std::move(F), SMLoc()); in ReadCheckFile()
867 SM.AddNewSourceBuffer(std::move(CmdLine), SMLoc()); in ReadCheckFile()
871 "IMPLICIT-CHECK", SM, 0); in ReadCheckFile()
913 if (P.ParsePattern(Buffer.substr(0, EOL), UsedPrefix, SM, LineNumber)) in ReadCheckFile()
918 SM.PrintMessage(SMLoc::getFromPointer(UsedPrefixStart), in ReadCheckFile()
931 SM.PrintMessage(SMLoc::getFromPointer(UsedPrefixStart), in ReadCheckFile()
978 static void PrintCheckFailed(const SourceMgr &SM, SMLoc Loc, in PrintCheckFailed() argument
982 SM.PrintMessage(Loc, SourceMgr::DK_Error, in PrintCheckFailed()
989 SM.PrintMessage(SMLoc::getFromPointer(Buffer.data()), SourceMgr::DK_Note, in PrintCheckFailed()
993 Pat.PrintFailureInfo(SM, Buffer, VariableTable); in PrintCheckFailed()
996 static void PrintCheckFailed(const SourceMgr &SM, const CheckString &CheckStr, in PrintCheckFailed() argument
999 PrintCheckFailed(SM, CheckStr.Loc, CheckStr.Pat, Buffer, VariableTable); in PrintCheckFailed()
1026 size_t CheckString::Check(const SourceMgr &SM, StringRef Buffer, in Check() argument
1038 LastPos = CheckDag(SM, Buffer, NotStrings, VariableTable); in Check()
1047 PrintCheckFailed(SM, *this, MatchBuffer, VariableTable); in Check()
1058 if (CheckNext(SM, SkippedRegion)) in Check()
1063 if (CheckSame(SM, SkippedRegion)) in Check()
1068 if (CheckNot(SM, SkippedRegion, NotStrings, VariableTable)) in Check()
1075 bool CheckString::CheckNext(const SourceMgr &SM, StringRef Buffer) const { in CheckNext() argument
1081 SM.getMemoryBuffer( in CheckNext()
1082 SM.FindBufferContainingLoc( in CheckNext()
1090 SM.PrintMessage(Loc, SourceMgr::DK_Error, Prefix + in CheckNext()
1092 SM.PrintMessage(SMLoc::getFromPointer(Buffer.end()), in CheckNext()
1094 SM.PrintMessage(SMLoc::getFromPointer(Buffer.data()), SourceMgr::DK_Note, in CheckNext()
1100 SM.PrintMessage(Loc, SourceMgr::DK_Error, Prefix + in CheckNext()
1102 SM.PrintMessage(SMLoc::getFromPointer(Buffer.end()), in CheckNext()
1104 SM.PrintMessage(SMLoc::getFromPointer(Buffer.data()), SourceMgr::DK_Note, in CheckNext()
1106 SM.PrintMessage(SMLoc::getFromPointer(FirstNewLine), SourceMgr::DK_Note, in CheckNext()
1114 bool CheckString::CheckSame(const SourceMgr &SM, StringRef Buffer) const { in CheckSame() argument
1120 SM.getMemoryBuffer(SM.FindBufferContainingLoc( in CheckSame()
1129 SM.PrintMessage(Loc, SourceMgr::DK_Error, in CheckSame()
1132 SM.PrintMessage(SMLoc::getFromPointer(Buffer.end()), SourceMgr::DK_Note, in CheckSame()
1134 SM.PrintMessage(SMLoc::getFromPointer(Buffer.data()), SourceMgr::DK_Note, in CheckSame()
1142 bool CheckString::CheckNot(const SourceMgr &SM, StringRef Buffer, in CheckNot() argument
1153 SM.PrintMessage(SMLoc::getFromPointer(Buffer.data()+Pos), in CheckNot()
1156 SM.PrintMessage(Pat->getLoc(), SourceMgr::DK_Note, in CheckNot()
1164 size_t CheckString::CheckDag(const SourceMgr &SM, StringRef Buffer, in CheckDag() argument
1193 PrintCheckFailed(SM, Pat.getLoc(), Pat, MatchBuffer, VariableTable); in CheckDag()
1202 SM.PrintMessage(SMLoc::getFromPointer(Buffer.data() + MatchPos), in CheckDag()
1206 SM.PrintMessage(SMLoc::getFromPointer(Buffer.data() + LastPos), in CheckDag()
1210 SM.PrintMessage(NotStrings[0]->getLoc(), SourceMgr::DK_Note, in CheckDag()
1213 SM.PrintMessage(Pat.getLoc(), SourceMgr::DK_Note, in CheckDag()
1225 if (CheckNot(SM, SkippedRegion, NotStrings, VariableTable)) in CheckDag()
1283 SourceMgr SM; in main() local
1287 if (ReadCheckFile(SM, CheckStrings)) in main()
1314 SM.AddNewSourceBuffer(std::move(F), SMLoc()); in main()
1336 size_t MatchLabelPos = CheckLabelStr.Check(SM, Buffer, true, in main()
1354 size_t MatchPos = CheckStr.Check(SM, CheckRegion, false, MatchLen, in main()