[clang] 8f9a54a - Correct stale documentation for default MSVC version numbers
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Tue May 23 10:13:06 PDT 2023
Author: Aaron Ballman
Date: 2023-05-23T13:12:56-04:00
New Revision: 8f9a54a64ac1ecb86672c2c91f1b397667a02150
URL: https://github.com/llvm/llvm-project/commit/8f9a54a64ac1ecb86672c2c91f1b397667a02150
DIFF: https://github.com/llvm/llvm-project/commit/8f9a54a64ac1ecb86672c2c91f1b397667a02150.diff
LOG: Correct stale documentation for default MSVC version numbers
We documented -fmsc-version as defaulting to 1300 and
-fms-compatibility-version as defaulting to 1800, neither of which
were accurate. We currently default to 1920.
See MSVCToolChain::computeMSVCVersion() for details.
Added:
Modified:
clang/docs/CommandGuide/clang.rst
clang/docs/UsersManual.rst
Removed:
################################################################################
diff --git a/clang/docs/CommandGuide/clang.rst b/clang/docs/CommandGuide/clang.rst
index faaf9c8d97ef3..139c8f25137d3 100644
--- a/clang/docs/CommandGuide/clang.rst
+++ b/clang/docs/CommandGuide/clang.rst
@@ -301,7 +301,8 @@ Language Selection and Mode Options
.. option:: -fmsc-version=
- Set _MSC_VER. Defaults to 1300 on Windows. Not set otherwise.
+ Set ``_MSC_VER``. When on Windows, this defaults to either the same value as
+ the currently installed version of cl.exe, or ``1920``. Not set otherwise.
.. option:: -fborland-extensions
diff --git a/clang/docs/UsersManual.rst b/clang/docs/UsersManual.rst
index 65d1eaaed53c9..cee037a7ea89d 100644
--- a/clang/docs/UsersManual.rst
+++ b/clang/docs/UsersManual.rst
@@ -3264,13 +3264,13 @@ definitions until the end of a translation unit. This flag is enabled by
default for Windows targets.
For compatibility with existing code that compiles with MSVC, clang defines the
-``_MSC_VER`` and ``_MSC_FULL_VER`` macros. These default to the values of 1800
-and 180000000 respectively, making clang look like an early release of Visual
-C++ 2013. The ``-fms-compatibility-version=`` flag overrides these values. It
-accepts a dotted version tuple, such as 19.00.23506. Changing the MSVC
-compatibility version makes clang behave more like that version of MSVC. For
-example, ``-fms-compatibility-version=19`` will enable C++14 features and define
-``char16_t`` and ``char32_t`` as builtin types.
+``_MSC_VER`` and ``_MSC_FULL_VER`` macros. When on Windows, these default to
+either the same value as the currently installed version of cl.exe, or ``1920``
+and ``192000000`` (respectively). The ``-fms-compatibility-version=`` flag
+overrides these values. It accepts a dotted version tuple, such as 19.00.23506.
+Changing the MSVC compatibility version makes clang behave more like that
+version of MSVC. For example, ``-fms-compatibility-version=19`` will enable
+C++14 features and define ``char16_t`` and ``char32_t`` as builtin types.
.. _cxx:
More information about the cfe-commits
mailing list