[Lexer] Let the compiler infer string lengths. No functionality change intended.

llvm-svn: 265126
This commit is contained in:
Benjamin Kramer 2016-04-01 10:04:07 +00:00
parent e550bbdf9d
commit 22f24f6815
1 changed files with 2 additions and 2 deletions

View File

@ -2636,8 +2636,8 @@ bool Lexer::IsStartOfConflictMarker(const char *CurPtr) {
return false;
// Check to see if we have <<<<<<< or >>>>.
if ((BufferEnd-CurPtr < 8 || StringRef(CurPtr, 7) != "<<<<<<<") &&
(BufferEnd-CurPtr < 6 || StringRef(CurPtr, 5) != ">>>> "))
if (!StringRef(CurPtr, BufferEnd - CurPtr).startswith("<<<<<<<") &&
!StringRef(CurPtr, BufferEnd - CurPtr).startswith(">>>> "))
return false;
// If we have a situation where we don't care about conflict markers, ignore