This is an archive of the discontinued LLVM Phabricator instance.

Bug 43965 - Value of _MSVC_LANG doesn't match MSVC++ VS2019 /std:c++latest mode
ClosedPublic

Authored by Manna on Dec 3 2019, 11:58 PM.

Details

Summary

The patch adds correct value of _MSVC_LANG to match with MSVC++ VS2019 /std:c++latest mode.

Bugzilla - Bug 43965
https://bugs.llvm.org/show_bug.cgi?id=43965

The value for a MS specific macro differs from Microsoft starting with VS2019 in /std:c++latest mode.

-bash-4.2$ cat msvclang.cpp
_MSVC_LANG

-bash-4.2$ cl /std:c++latest -E msvclang.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 19.20.27508.1 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

/std:c++latest is provided as a preview of language features from the latest C++
working draft, and we're eager to hear about bugs and suggestions for improvements.
However, note that these features are provided as-is without support, and subject
to changes or removal as the working draft evolves. See
https://go.microsoft.com/fwlink/?linkid=2045807 for details.

msvclang.cpp

201705L

-bash-4.2$ clang-cl /std:c++latest -E  msvclang.cpp
201704L

Diff Detail

Event Timeline

Manna created this revision.Dec 3 2019, 11:58 PM
rnk accepted this revision.Dec 4 2019, 1:31 PM

lgtm, do you need someone to push this?

This revision is now accepted and ready to land.Dec 4 2019, 1:31 PM
Manna added a comment.Dec 4 2019, 2:29 PM
In D70996#1769590, @rnk wrote:

lgtm, do you need someone to push this?

Thanks Reid. Could you please push the changes?

Thanks,
Soumi

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptDec 4 2019, 2:48 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript