Skip to content

Commit

Permalink
[Lexer] Let the compiler infer string lengths. No functionality chang…
Browse files Browse the repository at this point in the history
…e intended.

llvm-svn: 265126
  • Loading branch information
d0k committed Apr 1, 2016
1 parent e550bbd commit 22f24f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clang/lib/Lex/Lexer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 22f24f6

Please sign in to comment.