]> granicus.if.org Git - clang/commit
robustify the conflict marker stuff. Don't add 7 twice, which would
authorChris Lattner <sabre@nondot.org>
Mon, 17 May 2010 20:27:25 +0000 (20:27 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 17 May 2010 20:27:25 +0000 (20:27 +0000)
commit3d488990e13835cb35538b2f0cd53dbda92e36be
treee2dea12f934e02f1cf792c27fdcd51b4183a7ff7
parent40b492a43bac3ed0c465772aa6921d011cfc273f
robustify the conflict marker stuff.  Don't add 7 twice, which would
make it miss (invalid) things like:
<<<<<<<
>>>>>>>

and crash if

<<<<<<<

was at the end of the line.  When we find a >>>>>>> that is not at the
end of the line, make sure to reset Pos so we don't crash on something
like:
<<<<<<< >>>>>>>

This isn't worth making testcases for, since each would require a new file.

rdar://7987078 - signal 11 compiling "<<<<<<<<<<"

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103968 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Lex/Lexer.cpp
test/Lexer/conflict-marker.c