2012-04-15 12:41:49 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -Wnewline-eof -verify %s
|
2012-06-19 11:09:38 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -Wnewline-eof %s 2>&1 | FileCheck %s
|
2011-07-23 07:08:19 +08:00
|
|
|
// rdar://9133072
|
|
|
|
|
2012-06-19 11:09:38 +08:00
|
|
|
// Make sure the diagnostic shows up properly at the end of the last line.
|
|
|
|
// CHECK: newline-eof.c:9:63
|
|
|
|
|
2011-07-23 07:08:19 +08:00
|
|
|
// The following line isn't terminated, don't fix it.
|
2012-04-13 09:00:34 +08:00
|
|
|
void foo() {} // expected-warning{{no newline at end of file}}
|