[all-commits] [llvm/llvm-project] 3f643f: [clang-cl] Set _MSVC_LANG to 202002L with /std:c++20

Nico Weber via All-commits all-commits at lists.llvm.org
Wed Dec 1 05:55:13 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3f643f166494826144bad05eaa3ae14508788df6
      https://github.com/llvm/llvm-project/commit/3f643f166494826144bad05eaa3ae14508788df6
  Author: Nico Weber <thakis at chromium.org>
  Date:   2021-12-01 (Wed, 01 Dec 2021)

  Changed paths:
    M clang/lib/Basic/Targets/OSTargets.cpp
    M clang/test/Preprocessor/predefined-win-macros.c

  Log Message:
  -----------
  [clang-cl] Set _MSVC_LANG to 202002L with /std:c++20

MSVC says this should be 202002L for /std:c++20, and of VS16.11
that's indeed the case (older versions warn that they don't
understand /std:c++20, and then cl.exe defaults to C++14 and
sets _MSVC_LANG to 201402 accordingly).

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




More information about the All-commits mailing list