[PATCH] D38123: [driver] [cl] Add/fix c++17/c++latest

daxpedda via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 21 01:37:05 PDT 2017


daxpedda created this revision.

Current "/std:c++latest" adds "-std=c++17", VS has it's own "/std:c++17" for that now.

This is my first commit by the way, please tell me if there is anything I can do to improve.
Thanks.


https://reviews.llvm.org/D38123

Files:
  lib/Driver/ToolChains/Clang.cpp


Index: lib/Driver/ToolChains/Clang.cpp
===================================================================
--- lib/Driver/ToolChains/Clang.cpp
+++ lib/Driver/ToolChains/Clang.cpp
@@ -4060,7 +4060,8 @@
     if (const Arg *StdArg = Args.getLastArg(options::OPT__SLASH_std)) {
       LanguageStandard = llvm::StringSwitch<StringRef>(StdArg->getValue())
                              .Case("c++14", "-std=c++14")
-                             .Case("c++latest", "-std=c++1z")
+                             .Case("c++17", "-std=c++17")
+                             .Case("c++latest", "-std=c++2a")
                              .Default("");
       if (LanguageStandard.empty())
         D.Diag(clang::diag::warn_drv_unused_argument)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38123.116146.patch
Type: text/x-patch
Size: 730 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170921/f05266dc/attachment.bin>


More information about the cfe-commits mailing list