Expose no newline at end of file warning under Wnewline-eof flag.

llvm-svn: 135822
This commit is contained in:
Anna Zaks 2011-07-22 23:08:19 +00:00
parent 6320f52ff4
commit c8eab671cf
2 changed files with 7 additions and 1 deletions

View File

@ -38,7 +38,8 @@ def ext_multi_line_bcpl_comment : Extension<"multi-line // comment">,
def ext_bcpl_comment : Extension<
"// comments are not allowed in this language">,
InGroup<Comment>;
def ext_no_newline_eof : Extension<"no newline at end of file">;
def ext_no_newline_eof : Extension<"no newline at end of file">,
InGroup<DiagGroup<"newline-eof">>;
def ext_backslash_newline_eof : Extension<"backslash-newline at end of file">;
def ext_dollar_in_identifier : Extension<"'$' in identifier">;
def charize_microsoft_ext : Extension<"@# is a microsoft extension">;

View File

@ -0,0 +1,5 @@
// RUN: %clang -fsyntax-only -Wnewline-eof -verify %s
// rdar://9133072
// The following line isn't terminated, don't fix it.
void foo() {} // expected-warning{{No newline at end of file}}