C++1y is now C++14!

Changes diagnostic options, language standard options, diagnostic identifiers, diagnostic wording to use c++14 instead of c++1y. It also modifies related test cases to use the updated diagnostic wording.

llvm-svn: 215982
diff --git a/clang/test/SemaCXX/constant-expression-cxx11.cpp b/clang/test/SemaCXX/constant-expression-cxx11.cpp
index 86c2c11..57ca725 100644
--- a/clang/test/SemaCXX/constant-expression-cxx11.cpp
+++ b/clang/test/SemaCXX/constant-expression-cxx11.cpp
@@ -1443,7 +1443,7 @@
 
 namespace NamespaceAlias {
   constexpr int f() {
-    namespace NS = NamespaceAlias; // expected-warning {{use of this statement in a constexpr function is a C++1y extension}}
+    namespace NS = NamespaceAlias; // expected-warning {{use of this statement in a constexpr function is a C++14 extension}}
     return &NS::f != nullptr;
   }
 }
@@ -1700,7 +1700,7 @@
   template <typename T> struct X : T {
     constexpr X() {}
     double d = 0.0;
-    constexpr int f() { return sizeof(T); } // expected-warning {{will not be implicitly 'const' in C++1y}}
+    constexpr int f() { return sizeof(T); } // expected-warning {{will not be implicitly 'const' in C++14}}
   };
 
   // Virtual f(), not OK.
@@ -1715,17 +1715,17 @@
 }
 
 namespace ConstexprConstructorRecovery {
-  class X { 
-  public: 
-      enum E : short { 
-          headers = 0x1, 
-          middlefile = 0x2, 
-          choices = 0x4 
-      }; 
-      constexpr X() noexcept {}; 
-  protected: 
+  class X {
+  public:
+      enum E : short {
+          headers = 0x1,
+          middlefile = 0x2,
+          choices = 0x4
+      };
+      constexpr X() noexcept {};
+  protected:
       E val{0}; // expected-error {{cannot initialize a member subobject of type 'ConstexprConstructorRecovery::X::E' with an rvalue of type 'int'}}
-  }; 
+  };
   constexpr X x{};
 }
 
diff --git a/clang/test/SemaCXX/cxx0x-compat.cpp b/clang/test/SemaCXX/cxx0x-compat.cpp
index a58a7f8..ded51ab 100644
--- a/clang/test/SemaCXX/cxx0x-compat.cpp
+++ b/clang/test/SemaCXX/cxx0x-compat.cpp
@@ -43,7 +43,7 @@
 
 #else
 
-auto init_capture = [a(0)] {}; // expected-warning {{initialized lambda captures are incompatible with C++ standards before C++1y}}
+auto init_capture = [a(0)] {}; // expected-warning {{initialized lambda captures are incompatible with C++ standards before C++14}}
 static_assert(true); // expected-warning {{incompatible with C++ standards before C++1z}}
 
 #endif
diff --git a/clang/test/SemaCXX/cxx1y-constexpr-not-const.cpp b/clang/test/SemaCXX/cxx1y-constexpr-not-const.cpp
index 3f100b8..071b39c 100644
--- a/clang/test/SemaCXX/cxx1y-constexpr-not-const.cpp
+++ b/clang/test/SemaCXX/cxx1y-constexpr-not-const.cpp
@@ -14,5 +14,5 @@
 // expected-error@6 {{non-constexpr declaration of 'f' follows constexpr declaration}}
 // expected-note@5 {{previous}}
 #else
-// expected-warning@5 {{'constexpr' non-static member function will not be implicitly 'const' in C++1y; add 'const' to avoid a change in behavior}}
+// expected-warning@5 {{'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior}}
 #endif
diff --git a/clang/test/SemaCXX/cxx98-compat-pedantic.cpp b/clang/test/SemaCXX/cxx98-compat-pedantic.cpp
index b74dcb4..9eb0da3 100644
--- a/clang/test/SemaCXX/cxx98-compat-pedantic.cpp
+++ b/clang/test/SemaCXX/cxx98-compat-pedantic.cpp
@@ -49,5 +49,5 @@
 
 int k = 0b1001;
 #ifdef CXX1Y
-// expected-warning@-2 {{binary integer literals are incompatible with C++ standards before C++1y}}
+// expected-warning@-2 {{binary integer literals are incompatible with C++ standards before C++14}}
 #endif
diff --git a/clang/test/SemaCXX/cxx98-compat.cpp b/clang/test/SemaCXX/cxx98-compat.cpp
index 96af954..4fad458 100644
--- a/clang/test/SemaCXX/cxx98-compat.cpp
+++ b/clang/test/SemaCXX/cxx98-compat.cpp
@@ -1,5 +1,5 @@
 // RUN: %clang_cc1 -fsyntax-only -std=c++11 -Wc++98-compat -verify %s
-// RUN: %clang_cc1 -fsyntax-only -std=c++1y -Wc++98-compat -verify %s -DCXX1YCOMPAT
+// RUN: %clang_cc1 -fsyntax-only -std=c++1y -Wc++98-compat -verify %s -DCXX14COMPAT
 
 namespace std {
   struct type_info;
@@ -373,10 +373,10 @@
 }
 
 template<typename T> T var = T(10);
-#ifdef CXX1YCOMPAT
-// expected-warning@-2 {{variable templates are incompatible with C++ standards before C++1y}}
+#ifdef CXX14COMPAT
+// expected-warning@-2 {{variable templates are incompatible with C++ standards before C++14}}
 #else
-// expected-warning@-4 {{variable templates are a C++1y extension}}
+// expected-warning@-4 {{variable templates are a C++14 extension}}
 #endif
 
 // No diagnostic for specializations of variable templates; we will have
@@ -388,27 +388,27 @@
 
 class A {
   template<typename T> static T var = T(10);
-#ifdef CXX1YCOMPAT
-// expected-warning@-2 {{variable templates are incompatible with C++ standards before C++1y}}
+#ifdef CXX14COMPAT
+// expected-warning@-2 {{variable templates are incompatible with C++ standards before C++14}}
 #else
-// expected-warning@-4 {{variable templates are a C++1y extension}}
+// expected-warning@-4 {{variable templates are a C++14 extension}}
 #endif
 
-  template<typename T> static T* var<T*> = new T(); 
+  template<typename T> static T* var<T*> = new T();
 };
 
 struct B {  template<typename T> static T v; };
-#ifdef CXX1YCOMPAT
-// expected-warning@-2 {{variable templates are incompatible with C++ standards before C++1y}}
+#ifdef CXX14COMPAT
+// expected-warning@-2 {{variable templates are incompatible with C++ standards before C++14}}
 #else
-// expected-warning@-4 {{variable templates are a C++1y extension}}
+// expected-warning@-4 {{variable templates are a C++14 extension}}
 #endif
 
 template<typename T> T B::v = T();
-#ifdef CXX1YCOMPAT
-// expected-warning@-2 {{variable templates are incompatible with C++ standards before C++1y}}
+#ifdef CXX14COMPAT
+// expected-warning@-2 {{variable templates are incompatible with C++ standards before C++14}}
 #else
-// expected-warning@-4 {{variable templates are a C++1y extension}}
+// expected-warning@-4 {{variable templates are a C++14 extension}}
 #endif
 
 template<typename T> T* B::v<T*> = new T();
@@ -416,6 +416,6 @@
 template int B::v<int>;
 float fsvar = B::v<float>;
 
-#ifdef CXX1YCOMPAT
-int digit_seps = 123'456; // expected-warning {{digit separators are incompatible with C++ standards before C++1y}}
+#ifdef CXX14COMPAT
+int digit_seps = 123'456; // expected-warning {{digit separators are incompatible with C++ standards before C++14}}
 #endif
diff --git a/clang/test/SemaCXX/trailing-return-0x.cpp b/clang/test/SemaCXX/trailing-return-0x.cpp
index cf5e659..c6b22c5 100644
--- a/clang/test/SemaCXX/trailing-return-0x.cpp
+++ b/clang/test/SemaCXX/trailing-return-0x.cpp
@@ -17,8 +17,8 @@
     return 0;
 }
 
-auto g(); // expected-error{{return without trailing return type; deduced return types are a C++1y extension}}
-decltype(auto) g2(); // expected-warning{{extension}} expected-error-re{{{{^}}deduced return types are a C++1y extension}}
+auto g(); // expected-error{{return without trailing return type; deduced return types are a C++14 extension}}
+decltype(auto) g2(); // expected-warning{{extension}} expected-error-re{{{{^}}deduced return types are a C++14 extension}}
 auto badness = g2();
 
 int h() -> int; // expected-error{{trailing return type must specify return type 'auto', not 'int'}}
@@ -75,14 +75,14 @@
 namespace PR12053 {
   template <typename T>
   auto f1(T t) -> decltype(f1(t)) {} // expected-note{{candidate template ignored}}
-  
+
   void test_f1() {
     f1(0); // expected-error{{no matching function for call to 'f1'}}
   }
-  
+
   template <typename T>
   auto f2(T t) -> decltype(f2(&t)) {} // expected-note{{candidate template ignored}}
-  
+
   void test_f2() {
     f2(0); // expected-error{{no matching function for call to 'f2'}}
   }
diff --git a/clang/test/SemaCXX/unknown-type-name.cpp b/clang/test/SemaCXX/unknown-type-name.cpp
index f2c84df..9d28c31 100644
--- a/clang/test/SemaCXX/unknown-type-name.cpp
+++ b/clang/test/SemaCXX/unknown-type-name.cpp
@@ -27,7 +27,7 @@
 template<typename T>
 struct A {
   typedef T type;
-  
+
   type f();
 
   type g();
@@ -93,14 +93,14 @@
 template<typename T> int h(T::type, int); // expected-error{{missing 'typename'}}
 template<typename T> int h(T::type x, char); // expected-error{{missing 'typename'}}
 
-template<typename T> int junk1(T::junk); // expected-warning{{variable templates are a C++1y extension}}
+template<typename T> int junk1(T::junk); // expected-warning{{variable templates are a C++14 extension}}
 template<typename T> int junk2(T::junk) throw(); // expected-error{{missing 'typename'}}
 template<typename T> int junk3(T::junk) = delete; // expected-error{{missing 'typename'}} expected-warning{{C++11}}
 template<typename T> int junk4(T::junk j); // expected-error{{missing 'typename'}}
 
 // FIXME: We can tell this was intended to be a function because it does not
 //        have a dependent nested name specifier.
-template<typename T> int i(T::type, int()); // expected-warning{{variable templates are a C++1y extension}}
+template<typename T> int i(T::type, int()); // expected-warning{{variable templates are a C++14 extension}}
 
 // FIXME: We know which type specifier should have been specified here. Provide
 //        a fix-it to add 'typename A<T>::type'