diff options
author | Jordan Rose <jordan_rose@apple.com> | 2012-06-19 03:09:38 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2012-06-19 03:09:38 +0000 |
commit | 2e413f977d13d83b5baf7b5e4e93fe7c390959ca (patch) | |
tree | 8404372ce9556bbc5bbb2772493cec737b696c8f /test/Lexer | |
parent | 12b732a86cc2320dd6bc8fd7ef027b619c554f7e (diff) |
Fix the location of the fixit for -Wnewline-eof.
It turns out SourceManager treating the "one-past-the-end" location as invalid,
but then failing to set the invalid flag properly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158699 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Lexer')
-rw-r--r-- | test/Lexer/newline-eof.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/Lexer/newline-eof.c b/test/Lexer/newline-eof.c index 825a266a0a..a4a18835cf 100644 --- a/test/Lexer/newline-eof.c +++ b/test/Lexer/newline-eof.c @@ -1,5 +1,9 @@ // RUN: %clang_cc1 -fsyntax-only -Wnewline-eof -verify %s +// RUN: %clang_cc1 -fsyntax-only -Wnewline-eof %s 2>&1 | FileCheck %s // rdar://9133072 +// Make sure the diagnostic shows up properly at the end of the last line. +// CHECK: newline-eof.c:9:63 + // The following line isn't terminated, don't fix it. void foo() {} // expected-warning{{no newline at end of file}}
\ No newline at end of file |