teak-llvm/clang/test/Lexer/eof-conflict-marker.c
Benjamin Kramer e550bbdf9d [Lexer] Don't read out of bounds if a conflict marker is at the end of a file
This can happen as we look for '<<<<' while scanning tokens but then expect
'<<<<\n' to tell apart perforce from diff3 conflict markers. Just harden
the pointer arithmetic.

Found by libfuzzer + asan!

llvm-svn: 265125
2016-04-01 09:58:45 +00:00

11 lines
318 B
C

// RUN: %clang_cc1 %s -verify -fsyntax-only
// vim: set binary noeol:
// This file intentionally ends without a \n on the last line. Make sure your
// editor doesn't add one.
>>>> ORIGINAL
// expected-error@-1 {{version control conflict marker in file}}
<<<<
// expected-error@-1 {{expected identifier or '('}}
<<<<