[PATCH] D131465: C++/ObjC++: switch to gnu++17 as the default standard

Hans Wennborg via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 29 06:02:42 PDT 2022


hans added a comment.

In D131465#3821701 <https://reviews.llvm.org/D131465#3821701>, @aaron.ballman wrote:

> Perhaps the simple rule we're going for is "when executed on Windows, Clang defaults to C++17 unless it is executed from a context in which an MSVC library can be detected, in which case Clang defaults to the same language standard as used by that version of MSVC"? It's a bit long-winded, but the idea being that we try to match MSVC's default when compiling against MSVC libraries and otherwise stick with the clang default.

But the last sentence is basically what we have today. When targeting windows-msvc, we try to match the behavior of the msvc version being targeted, which is in turn determined by what flags the user passes, what msvc installation is found in the environment, or the default (19.14).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131465/new/

https://reviews.llvm.org/D131465



More information about the cfe-commits mailing list