Lex: Don't crash if both conflict markers are on the same line
authorDavid Majnemer <david.majnemer@gmail.com>
Sun, 14 Dec 2014 04:53:11 +0000 (04:53 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Sun, 14 Dec 2014 04:53:11 +0000 (04:53 +0000)
commit5a54977ea8ba690192d98c1fd4571858cc1451ac
treeceedb028c30344d6ad0f7c0cbb82f32362e0e3c9
parent11c4874d83c5f3972013c3ea38faef7665072263
Lex: Don't crash if both conflict markers are on the same line

We would check if the terminator marker is on a newline.  However, the
logic would end up out-of-bounds if the terminator marker immediately
follows the start marker.

This fixes PR21820.

llvm-svn: 224210
clang/lib/Lex/Lexer.cpp
clang/test/Lexer/conflict-marker.c