| 1 |
// RUN: %clang_cc1 -verify=good -std=c2y -Wall -pedantic %s |
| 2 |
// RUN: %clang_cc1 -verify -Wnewline-eof -std=c2y -Wall -pedantic %s |
| 3 |
// RUN: %clang_cc1 -verify=good -std=c23 -Wall -pedantic %s |
| 4 |
// RUN: %clang_cc1 -verify=good -std=c23 %s |
| 5 |
// RUN: %clang_cc1 -verify -Wnewline-eof -std=c23 %s |
| 6 |
|
| 7 |
/* WG14 N3411: Yes |
| 8 |
* Slay Some Earthly Demons XII |
| 9 |
* |
| 10 |
* Allow a non-empty source file to end without a final newline character. Note |
| 11 |
* that this file intentionally does not end with a trailing newline. |
| 12 |
*/ |
| 13 |
// good-no-diagnostics |
| 14 |
|
| 15 |
int x; // Ensure the file contains at least one declaration. |
| 16 |
// expected-warning {{no newline at end of file}} |