blob: a4a18835cf5fc1781bd7091af954aaf62c5111a9 [file] [log] [blame]
Seth Cantrell5d2d0462012-04-15 04:41:49 +00001// RUN: %clang_cc1 -fsyntax-only -Wnewline-eof -verify %s
Jordan Rose2e413f92012-06-19 03:09:38 +00002// RUN: %clang_cc1 -fsyntax-only -Wnewline-eof %s 2>&1 | FileCheck %s
Anna Zakscfe1bcb2011-07-22 23:08:19 +00003// rdar://9133072
4
Jordan Rose2e413f92012-06-19 03:09:38 +00005// Make sure the diagnostic shows up properly at the end of the last line.
6// CHECK: newline-eof.c:9:63
7
Anna Zakscfe1bcb2011-07-22 23:08:19 +00008// The following line isn't terminated, don't fix it.
Seth Cantrelld5552222012-04-13 01:00:34 +00009void foo() {} // expected-warning{{no newline at end of file}}