Lines Matching refs:SM

98   /// ParsePattern - Parse the given string into the Pattern.  SM provides the
102 bool ParsePattern(StringRef PatternStr, SourceMgr &SM, unsigned LineNumber);
115 void PrintFailureInfo(const SourceMgr &SM, StringRef Buffer,
129 bool AddRegExToRegEx(StringRef RS, unsigned &CurParen, SourceMgr &SM);
151 bool Pattern::ParsePattern(StringRef PatternStr, SourceMgr &SM,
163 SM.PrintMessage(PatternLoc, SourceMgr::DK_Error,
189 SM.PrintMessage(SMLoc::getFromPointer(PatternStr.data()),
202 if (AddRegExToRegEx(PatternStr.substr(2, End-2), CurParen, SM))
221 SM.PrintMessage(SMLoc::getFromPointer(PatternStr.data()),
235 SM.PrintMessage(SMLoc::getFromPointer(Name.data()), SourceMgr::DK_Error,
247 SM.PrintMessage(SMLoc::getFromPointer(Name.data()),
257 SM.PrintMessage(SMLoc::getFromPointer(Name.data()+i),
265 SM.PrintMessage(SMLoc::getFromPointer(Name.data()), SourceMgr::DK_Error,
277 SM.PrintMessage(SMLoc::getFromPointer(Name.data()),
294 if (AddRegExToRegEx(MatchStr.substr(NameEnd+1), CurParen, SM))
339 SourceMgr &SM) {
343 SM.PrintMessage(SMLoc::getFromPointer(RS.data()), SourceMgr::DK_Error,
471 void Pattern::PrintFailureInfo(const SourceMgr &SM, StringRef Buffer,
504 SM.PrintMessage(SMLoc::getFromPointer(Buffer.data()), SourceMgr::DK_Note,
542 SM.PrintMessage(SMLoc::getFromPointer(Buffer.data() + Best),
613 size_t Check(const SourceMgr &SM, StringRef Buffer, bool IsLabel,
617 bool CheckNext(const SourceMgr &SM, StringRef Buffer) const;
620 bool CheckNot(const SourceMgr &SM, StringRef Buffer,
625 size_t CheckDag(const SourceMgr &SM, StringRef Buffer,
673 static bool ReadCheckFile(SourceMgr &SM,
688 SM.AddNewSourceBuffer(F, SMLoc());
752 if (P.ParsePattern(Buffer.substr(0, EOL), SM, LineNumber))
757 SM.PrintMessage(SMLoc::getFromPointer(CheckPrefixStart),
771 SM.PrintMessage(SMLoc::getFromPointer(CheckPrefixStart),
810 static void PrintCheckFailed(const SourceMgr &SM, const SMLoc &Loc,
814 SM.PrintMessage(Loc, SourceMgr::DK_Error,
821 SM.PrintMessage(SMLoc::getFromPointer(Buffer.data()), SourceMgr::DK_Note,
825 Pat.PrintFailureInfo(SM, Buffer, VariableTable);
828 static void PrintCheckFailed(const SourceMgr &SM, const CheckString &CheckStr,
831 PrintCheckFailed(SM, CheckStr.Loc, CheckStr.Pat, Buffer, VariableTable);
854 size_t CheckString::Check(const SourceMgr &SM, StringRef Buffer,
862 LastPos = CheckDag(SM, Buffer, NotStrings, VariableTable);
871 PrintCheckFailed(SM, *this, MatchBuffer, VariableTable);
881 if (CheckNext(SM, SkippedRegion))
886 if (CheckNot(SM, SkippedRegion, NotStrings, VariableTable))
893 bool CheckString::CheckNext(const SourceMgr &SM, StringRef Buffer) const {
899 SM.getMemoryBuffer(
900 SM.FindBufferContainingLoc(
907 SM.PrintMessage(Loc, SourceMgr::DK_Error, CheckPrefix+
909 SM.PrintMessage(SMLoc::getFromPointer(Buffer.end()),
911 SM.PrintMessage(SMLoc::getFromPointer(Buffer.data()), SourceMgr::DK_Note,
917 SM.PrintMessage(Loc, SourceMgr::DK_Error, CheckPrefix+
919 SM.PrintMessage(SMLoc::getFromPointer(Buffer.end()),
921 SM.PrintMessage(SMLoc::getFromPointer(Buffer.data()), SourceMgr::DK_Note,
929 bool CheckString::CheckNot(const SourceMgr &SM, StringRef Buffer,
942 SM.PrintMessage(SMLoc::getFromPointer(Buffer.data()+Pos),
945 SM.PrintMessage(Pat->getLoc(), SourceMgr::DK_Note,
953 size_t CheckString::CheckDag(const SourceMgr &SM, StringRef Buffer,
984 PrintCheckFailed(SM, Pat.getLoc(), Pat, MatchBuffer, VariableTable);
993 SM.PrintMessage(SMLoc::getFromPointer(Buffer.data() + MatchPos),
997 SM.PrintMessage(SMLoc::getFromPointer(Buffer.data() + LastPos),
1001 SM.PrintMessage(NotStrings[0]->getLoc(), SourceMgr::DK_Note,
1004 SM.PrintMessage(Pat.getLoc(), SourceMgr::DK_Note,
1016 if (CheckNot(SM, SkippedRegion, NotStrings, VariableTable))
1034 SourceMgr SM;
1038 if (ReadCheckFile(SM, CheckStrings))
1060 SM.AddNewSourceBuffer(F, SMLoc());
1086 size_t MatchLabelPos = CheckLabelStr.Check(SM, Buffer, true,
1104 size_t MatchPos = CheckStr.Check(SM, CheckRegion, false, MatchLen,