llvm.org GIT mirror llvm / f724364
Fix FileCheck: substr() expect the length of the string as 2nd arg The code assumed that substr() was taking start,end while it takes start,length. From: Mehdi Amini <mehdi.amini@apple.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231988 91177308-0d34-0410-b5e6-96231b3b80d8 Mehdi Amini 5 years ago
1 changed file(s) with 1 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
10521052 PrintCheckFailed(SM, *this, MatchBuffer, VariableTable);
10531053 return StringRef::npos;
10541054 }
1055 MatchPos += LastPos;
10561055
10571056 // Similar to the above, in "label-scan mode" we can't yet handle CHECK-NEXT
10581057 // or CHECK-NOT
10751074 return StringRef::npos;
10761075 }
10771076
1078 return MatchPos;
1077 return LastPos + MatchPos;
10791078 }
10801079
10811080 bool CheckString::CheckNext(const SourceMgr &SM, StringRef Buffer) const {