f4a2713ac8
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
15 lines
No EOL
720 B
C
15 lines
No EOL
720 B
C
// RUN: %clang_cc1 -fsyntax-only -Wnewline-eof -verify %s
|
|
// RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s
|
|
// RUN: %clang_cc1 -fsyntax-only -x c++ -std=c++03 -pedantic -verify %s
|
|
// RUN: %clang_cc1 -fsyntax-only -Wnewline-eof %s 2>&1 | FileCheck %s
|
|
// rdar://9133072
|
|
|
|
// In C++11 mode, this is allowed, so don't warn in pedantic mode.
|
|
// RUN: %clang_cc1 -fsyntax-only -x c++ -std=c++11 -Wnewline-eof -verify %s
|
|
// RUN: %clang_cc1 -fsyntax-only -x c++ -std=c++11 -Werror -pedantic %s
|
|
|
|
// Make sure the diagnostic shows up properly at the end of the last line.
|
|
// CHECK: newline-eof.c:[[@LINE+3]]:63
|
|
|
|
// The following line isn't terminated, don't fix it.
|
|
void foo() {} // expected-warning{{no newline at end of file}}
|