Fix crash on end-of-file after \ in a char literal, fixes PR14369.
authorNico Weber <nicolasweber@gmx.de>
Sat, 17 Nov 2012 20:25:54 +0000 (20:25 +0000)
committerNico Weber <nicolasweber@gmx.de>
Sat, 17 Nov 2012 20:25:54 +0000 (20:25 +0000)
commit4e270380c150b3086875edd10e72f677b95f7e14
treee66365d45289e164ff4547c3e1e54cbc3c8de9f5
parentd41d09424487d386b780986a030d9915af4fdee1
Fix crash on end-of-file after \ in a char literal, fixes PR14369.

This makes LexCharConstant() look more like LexStringLiteral(), which doesn't
have this bug. Add tests for eof after \ for several other cases.

llvm-svn: 168269
clang/lib/Lex/Lexer.cpp
clang/test/Lexer/eof-char.c [new file with mode: 0644]
clang/test/Lexer/eof-file.c [new file with mode: 0644]
clang/test/Lexer/eof-string.c [new file with mode: 0644]