summaryrefslogtreecommitdiffstats
path: root/test/Lexer/eof-number.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Lexer/eof-number.c')
-rw-r--r--test/Lexer/eof-number.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Lexer/eof-number.c b/test/Lexer/eof-number.c
new file mode 100644
index 0000000..d97a6fe
--- /dev/null
+++ b/test/Lexer/eof-number.c
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 %s -verify -fsyntax-only -Wnewline-eof
+// vim: set binary noeol:
+
+// This file intentionally ends without a \n on the last line. Make sure your
+// editor doesn't add one.
+
+// expected-error@+2{{unterminated conditional directive}}
+// expected-warning@+1{{no newline at end of file}}
+#if 0 \ No newline at end of file
OpenPOWER on IntegriCloud