diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2015-03-29 18:07:29 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2015-03-29 18:07:29 +0000 |
commit | 95871f43bf7d19f90bfe8a953e7bbe13b753081e (patch) | |
tree | 707658cce1313ec406fed6e13866c97dc8fa07d0 /test/FixIt | |
parent | 2d7fe73daa9f060ace98bf644ee3aa37bcc29e35 (diff) |
[edit] Don't hit an assert when trying to delete a trailing space at EOF
The buffer is guaranteed to be zero-terminated so we can just
circumvent the check. Found by afl-fuzz.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@233496 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/FixIt')
-rw-r--r-- | test/FixIt/fixit-eof-space.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/FixIt/fixit-eof-space.c b/test/FixIt/fixit-eof-space.c new file mode 100644 index 0000000000..dc9a45d0c5 --- /dev/null +++ b/test/FixIt/fixit-eof-space.c @@ -0,0 +1,9 @@ +// RUN: not %clang_cc1 %s -fsyntax-only -fdiagnostics-parseable-fixits 2>&1 | FileCheck %s +// vim: set binary noeol: + +// This file intentionally ends without a \n on the last line. Make sure your +// editor doesn't add one. The trailing space is also intentional. + +// CHECK: :9:8: warning: duplicate 'extern' declaration specifier +// CHECK: fix-it:"{{.*}}":{9:8-9:15}:"" +extern extern
\ No newline at end of file |