PR10458: Finesse behaviour of C++0x features when in pre-0x mode. Accept for-range and auto with an ExtWarn, and produce a -Wc++0x-compat warning in C++98 mode when auto is used as a storage class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139102 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/auto-cxx98.cpp b/test/SemaCXX/auto-cxx98.cpp
index fe02811..8d22469 100644
--- a/test/SemaCXX/auto-cxx98.cpp
+++ b/test/SemaCXX/auto-cxx98.cpp
@@ -1,5 +1,8 @@
 // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++98
 void f() {
-  auto int a;
-  int auto b;
+  auto int a; // expected-warning {{'auto' storage class specifier is redundant and incompatible with C++0x}}
+  int auto b; // expected-warning {{'auto' storage class specifier is redundant and incompatible with C++0x}}
+  auto c; // expected-warning {{C++0x extension}} expected-error {{requires an initializer}}
+  static auto d = 0; // expected-warning {{C++0x extension}}
+  auto static e = 0; // expected-warning {{C++0x extension}}
 }