Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Lexer / newline-eof.c
blob9f5033384e16fe387b3b9433b8f18f70b8355916
1 // RUN: %clang_cc1 -fsyntax-only -Wnewline-eof -verify %s
2 // RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s
3 // RUN: %clang_cc1 -fsyntax-only -x c++ -std=c++03 -pedantic -verify %s
4 // RUN: %clang_cc1 -fsyntax-only -Wnewline-eof %s 2>&1 | FileCheck %s
6 // In C++11 mode, this is allowed, so don't warn in pedantic mode.
7 // RUN: %clang_cc1 -fsyntax-only -x c++ -std=c++11 -Wnewline-eof -verify %s
8 // RUN: %clang_cc1 -fsyntax-only -x c++ -std=c++11 -Werror -pedantic %s
10 // Make sure the diagnostic shows up properly at the end of the last line.
11 // CHECK: newline-eof.c:[[@LINE+3]]:67
13 // The following line isn't terminated, don't fix it.
14 void foo(void) {} // expected-warning{{no newline at end of file}}