newline-eof.c revision 2e413f977d13d83b5baf7b5e4e93fe7c390959ca
1// RUN: %clang_cc1 -fsyntax-only -Wnewline-eof -verify %s
2// RUN: %clang_cc1 -fsyntax-only -Wnewline-eof %s 2>&1 | FileCheck %s
3// rdar://9133072
4
5// Make sure the diagnostic shows up properly at the end of the last line.
6// CHECK: newline-eof.c:9:63
7
8// The following line isn't terminated, don't fix it.
9void foo() {} // expected-warning{{no newline at end of file}}