summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2017-08-14 15:48:04 +0000
committerHans Wennborg <hans@hanshq.net>2017-08-14 15:48:04 +0000
commit63c6fd256d0bccded905f0b05158939291d3f151 (patch)
tree1ccec2006cf0c47089fba5d979b6001100d4c3ca
parent6ee431111dca9fb627eb19800bcd184c460386d1 (diff)
Merging r310516:
------------------------------------------------------------------------ r310516 | hans | 2017-08-09 13:12:53 -0700 (Wed, 09 Aug 2017) | 13 lines Make -std=c++17 an alias of -std=c++1z 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/branches/release_50@310848 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Frontend/LangStandards.def10
-rw-r--r--test/Driver/unknown-std.cpp4
-rw-r--r--test/SemaCXX/cxx1z-init-statement.cpp1
3 files changed, 9 insertions, 6 deletions
diff --git a/include/clang/Frontend/LangStandards.def b/include/clang/Frontend/LangStandards.def
index 669e487023..a019d63922 100644
--- a/include/clang/Frontend/LangStandards.def
+++ b/include/clang/Frontend/LangStandards.def
@@ -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",
diff --git a/test/Driver/unknown-std.cpp b/test/Driver/unknown-std.cpp
index 195a671eda..a7aae51122 100644
--- a/test/Driver/unknown-std.cpp
+++ b/test/Driver/unknown-std.cpp
@@ -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
diff --git a/test/SemaCXX/cxx1z-init-statement.cpp b/test/SemaCXX/cxx1z-init-statement.cpp
index 4afe0402d1..d37acd08ce 100644
--- a/test/SemaCXX/cxx1z-init-statement.cpp
+++ b/test/SemaCXX/cxx1z-init-statement.cpp
@@ -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;