]> granicus.if.org Git - clang/commitdiff
Make -std=c++17 an alias of -std=c++1z
authorHans Wennborg <hans@hanshq.net>
Wed, 9 Aug 2017 20:12:53 +0000 (20:12 +0000)
committerHans Wennborg <hans@hanshq.net>
Wed, 9 Aug 2017 20:12:53 +0000 (20:12 +0000)
As suggested on PR33912.

Trying to keep this small to make it easy to merge to the 5.0 branch. We
can do a follow-up with more thorough renaming (diagnostic text,
options, ids, etc.) later.

(For C++14 this was done in r215982, and I think a smaller patch for the
3.5 branch:
http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20140818/113013.html)

Differential Revision: https://reviews.llvm.org/D36532

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310516 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Frontend/LangStandards.def
test/Driver/unknown-std.cpp
test/SemaCXX/cxx1z-init-statement.cpp

index 669e487023a5461278e8326d2398c78f0a83ff1b..a019d6392214077a7f7c7adae426356aad39e4d2 100644 (file)
@@ -109,15 +109,17 @@ LANGSTANDARD(gnucxx14, "gnu++14",
              GNUMode)
 LANGSTANDARD_ALIAS_DEPR(gnucxx14, "gnu++1y")
 
-LANGSTANDARD(cxx1z, "c++1z",
-             CXX, "Working draft for ISO C++ 2017",
+LANGSTANDARD(cxx17, "c++17",
+             CXX, "ISO C++ 2017 with amendments",
              LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus1z |
              Digraphs | HexFloat)
+LANGSTANDARD_ALIAS_DEPR(cxx17, "c++1z")
 
-LANGSTANDARD(gnucxx1z, "gnu++1z",
-             CXX, "Working draft for ISO C++ 2017 with GNU extensions",
+LANGSTANDARD(gnucxx17, "gnu++17",
+             CXX, "ISO C++ 2017 with amendments and GNU extensions",
              LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus1z |
              Digraphs | HexFloat | GNUMode)
+LANGSTANDARD_ALIAS_DEPR(gnucxx17, "gnu++1z")
 
 LANGSTANDARD(cxx2a, "c++2a",
              CXX, "Working draft for ISO C++ 2020",
index 195a671edadf13bd07b10191f760be21e6490d58..a7aae5112221040a71b6973add7edefd1b4916b3 100644 (file)
@@ -13,8 +13,8 @@
 // CHECK-NEXT: note: use 'gnu++11' for 'ISO C++ 2011 with amendments and GNU extensions' standard
 // CHECK-NEXT: note: use 'c++14' for 'ISO C++ 2014 with amendments' standard
 // CHECK-NEXT: note: use 'gnu++14' for 'ISO C++ 2014 with amendments and GNU extensions' standard
-// CHECK-NEXT: note: use 'c++1z' for 'Working draft for ISO C++ 2017' standard
-// CHECK-NEXT: note: use 'gnu++1z' for 'Working draft for ISO C++ 2017 with GNU extensions' standard
+// CHECK-NEXT: note: use 'c++17' for 'ISO C++ 2017 with amendments' standard
+// CHECK-NEXT: note: use 'gnu++17' for 'ISO C++ 2017 with amendments and GNU extensions' standard
 // CHECK-NEXT: note: use 'c++2a' for 'Working draft for ISO C++ 2020' standard
 // CHECK-NEXT: note: use 'gnu++2a' for 'Working draft for ISO C++ 2020 with GNU extensions' standard
 // CUDA-NEXT: note: use 'cuda' for 'NVIDIA CUDA(tm)' standard
index 4afe0402d13f2a963d64edfd91d71ab2b4bc57cf..d37acd08ce77d1fb66b15554109f133dbcec0055 100644 (file)
@@ -1,4 +1,5 @@
 // RUN: %clang_cc1 -std=c++1z -verify %s
+// RUN: %clang_cc1 -std=c++17 -verify %s
 
 void testIf() {
   int x = 0;