Author: d0k Date: Fri Apr 1 05:04:07 2016 New Revision: 265126 URL: http://llvm.org/viewvc/llvm-project?rev=265126&view=rev Log: [Lexer] Let the compiler infer string lengths. No functionality change intended.
Modified: cfe/trunk/lib/Lex/Lexer.cpp Modified: cfe/trunk/lib/Lex/Lexer.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/Lexer.cpp?rev=265126&r1=265125&r2=265126&view=diff ============================================================================== --- cfe/trunk/lib/Lex/Lexer.cpp (original) +++ cfe/trunk/lib/Lex/Lexer.cpp Fri Apr 1 05:04:07 2016 @@ -2636,8 +2636,8 @@ bool Lexer::IsStartOfConflictMarker(cons 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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits