[PATCH] D36532: Add -std=c++17
This revision was automatically updated to reflect the committed changes. Closed by commit rL310516: Make -std=c++17 an alias of -std=c++1z (authored by hans). Changed prior to commit: https://reviews.llvm.org/D36532?vs=110430&id=110462#toc Repository: rL LLVM https://reviews.llvm.org/D36532 Files: cfe/trunk/include/clang/Frontend/LangStandards.def cfe/trunk/test/Driver/unknown-std.cpp cfe/trunk/test/SemaCXX/cxx1z-init-statement.cpp Index: cfe/trunk/include/clang/Frontend/LangStandards.def === --- cfe/trunk/include/clang/Frontend/LangStandards.def +++ cfe/trunk/include/clang/Frontend/LangStandards.def @@ -109,15 +109,17 @@ 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: cfe/trunk/test/Driver/unknown-std.cpp === --- cfe/trunk/test/Driver/unknown-std.cpp +++ cfe/trunk/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 Index: cfe/trunk/test/SemaCXX/cxx1z-init-statement.cpp === --- cfe/trunk/test/SemaCXX/cxx1z-init-statement.cpp +++ cfe/trunk/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; Index: cfe/trunk/include/clang/Frontend/LangStandards.def === --- cfe/trunk/include/clang/Frontend/LangStandards.def +++ cfe/trunk/include/clang/Frontend/LangStandards.def @@ -109,15 +109,17 @@ 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: cfe/trunk/test/Driver/unknown-std.cpp === --- cfe/trunk/test/Driver/unknown-std.cpp +++ cfe/trunk/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 exte
[PATCH] D36532: Add -std=c++17
hans added inline comments. Comment at: include/clang/Frontend/LangStandards.def:113 +LANGSTANDARD(cxx17, "c++17", + CXX, "ISO C++ 2017", LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus1z | rsmith wrote: > Missing "with amendments" compared to the other languages. We already > implement some DRs against c++17. Thanks! I wasn't sure about that part. https://reviews.llvm.org/D36532 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D36532: Add -std=c++17
rsmith accepted this revision. rsmith added inline comments. This revision is now accepted and ready to land. Comment at: include/clang/Frontend/LangStandards.def:113 +LANGSTANDARD(cxx17, "c++17", + CXX, "ISO C++ 2017", LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus1z | Missing "with amendments" compared to the other languages. We already implement some DRs against c++17. https://reviews.llvm.org/D36532 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D36532: Add -std=c++17
hans created this revision. 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) https://reviews.llvm.org/D36532 Files: include/clang/Frontend/LangStandards.def test/Driver/unknown-std.cpp test/SemaCXX/cxx1z-init-statement.cpp Index: test/SemaCXX/cxx1z-init-statement.cpp === --- test/SemaCXX/cxx1z-init-statement.cpp +++ 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; Index: test/Driver/unknown-std.cpp === --- test/Driver/unknown-std.cpp +++ 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' standard +// CHECK-NEXT: note: use 'gnu++17' for 'ISO C++ 2017 with 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: include/clang/Frontend/LangStandards.def === --- include/clang/Frontend/LangStandards.def +++ include/clang/Frontend/LangStandards.def @@ -109,15 +109,17 @@ 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", 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 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: test/SemaCXX/cxx1z-init-statement.cpp === --- test/SemaCXX/cxx1z-init-statement.cpp +++ 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; Index: test/Driver/unknown-std.cpp === --- test/Driver/unknown-std.cpp +++ 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' standard +// CHECK-NEXT: note: use 'gnu++17' for 'ISO C++ 2017 with 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: include/clang/Frontend/LangStandards.def === --- include/clang/Frontend/LangStandards.def +++ include/clang/Frontend/LangStandards.def @@ -109,15 +109,17 @@ 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", LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus1z | Digraphs | HexFloat) +LANGSTANDARD_ALIAS_DEPR(cxx17, "c++1z") -LANGSTANDARD(gnucxx1z, "gnu++1z", -