mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-09 09:46:06 +00:00

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
5 lines
301 B
C++
5 lines
301 B
C++
// 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}}
|