summaryrefslogtreecommitdiffstats
path: root/clang/test/Lexer/newline-eof-c++98-compat.cpp
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2013-08-23 15:42:01 +0000
committerJordan Rose <jordan_rose@apple.com>2013-08-23 15:42:01 +0000
commit4c55d45b13e9a09b48c4dffefae04ea21e2e5822 (patch)
tree589c4c6d39b9e53923c2975700ef2b6a61a47744 /clang/test/Lexer/newline-eof-c++98-compat.cpp
parentc7cda1c59ef9559331160cd6d48d8f7e6177a180 (diff)
downloadbcm5719-llvm-4c55d45b13e9a09b48c4dffefae04ea21e2e5822.tar.gz
bcm5719-llvm-4c55d45b13e9a09b48c4dffefae04ea21e2e5822.zip
Respect -Wnewline-eof even in C++11 mode.
If the user has requested this warning, we should emit it, even if it's not an extension in the current language mode. However, being an extension is more important, so prefer the pedantic warning or the pedantic-compatibility warning if those are enabled. <rdar://problem/12922063> llvm-svn: 189110
Diffstat (limited to 'clang/test/Lexer/newline-eof-c++98-compat.cpp')
-rw-r--r--clang/test/Lexer/newline-eof-c++98-compat.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/test/Lexer/newline-eof-c++98-compat.cpp b/clang/test/Lexer/newline-eof-c++98-compat.cpp
index 3e5c8e22623..9af0b889537 100644
--- a/clang/test/Lexer/newline-eof-c++98-compat.cpp
+++ b/clang/test/Lexer/newline-eof-c++98-compat.cpp
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -fsyntax-only -Wc++98-compat-pedantic -std=c++11 -verify %s
+// RUN: %clang_cc1 -fsyntax-only -Wc++98-compat-pedantic -Wnewline-eof -std=c++11 -verify %s
// The following line isn't terminated, don't fix it.
void foo() {} // expected-warning{{C++98 requires newline at end of file}} \ No newline at end of file
OpenPOWER on IntegriCloud