diff options
author | David Majnemer <david.majnemer@gmail.com> | 2016-06-28 03:13:16 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2016-06-28 03:13:16 +0000 |
commit | 017cf35d7c695cda3c1af49501a3f80c51eab672 (patch) | |
tree | 3257357597573e77c8cdb6c3844c9ce05e886b89 /clang/test/Preprocessor | |
parent | 2916a612cd7b8ba6fc74c07af0e5c89fdb72e9cd (diff) | |
download | bcm5719-llvm-017cf35d7c695cda3c1af49501a3f80c51eab672.tar.gz bcm5719-llvm-017cf35d7c695cda3c1af49501a3f80c51eab672.zip |
[clang-cl] Define _MSVC_LANG
Recently, Microsoft added support for a flag, /std, which controls which
version of the language rules MSVC should use.
MSVC hasn't updated __cplusplus though.
Instead, they added a new macro, _MSVC_LANG, which is defined in a
similar fashion to __cplusplus. This is used to indicate which mode the
compiler is in.
llvm-svn: 273987
Diffstat (limited to 'clang/test/Preprocessor')
-rw-r--r-- | clang/test/Preprocessor/predefined-macros.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/clang/test/Preprocessor/predefined-macros.c b/clang/test/Preprocessor/predefined-macros.c index 53964061ce6..7385cd2c93e 100644 --- a/clang/test/Preprocessor/predefined-macros.c +++ b/clang/test/Preprocessor/predefined-macros.c @@ -1,10 +1,11 @@ // This test verifies that the correct macros are predefined. // -// RUN: %clang_cc1 %s -E -dM -triple i686-pc-win32 -fms-extensions -fms-compatibility \ -// RUN: -fms-compatibility-version=13.00 -o - | FileCheck -match-full-lines %s --check-prefix=CHECK-MS +// RUN: %clang_cc1 %s -x c++ -E -dM -triple i686-pc-win32 -fms-extensions -fms-compatibility \ +// RUN: -fms-compatibility-version=19.00 -std=c++1z -o - | FileCheck -match-full-lines %s --check-prefix=CHECK-MS // CHECK-MS: #define _INTEGRAL_MAX_BITS 64 // CHECK-MS: #define _MSC_EXTENSIONS 1 -// CHECK-MS: #define _MSC_VER 1300 +// CHECK-MS: #define _MSC_VER 1900 +// CHECK-MS: #define _MSVC_LANG 201403L // CHECK-MS: #define _M_IX86 600 // CHECK-MS: #define _M_IX86_FP 0 // CHECK-MS: #define _WIN32 1 @@ -13,11 +14,12 @@ // CHECK-MS-NOT: GNU // CHECK-MS-NOT: GXX // -// RUN: %clang_cc1 %s -E -dM -triple x86_64-pc-win32 -fms-extensions -fms-compatibility \ -// RUN: -fms-compatibility-version=13.00 -o - | FileCheck -match-full-lines %s --check-prefix=CHECK-MS64 +// RUN: %clang_cc1 %s -x c++ -E -dM -triple x86_64-pc-win32 -fms-extensions -fms-compatibility \ +// RUN: -fms-compatibility-version=19.00 -std=c++14 -o - | FileCheck -match-full-lines %s --check-prefix=CHECK-MS64 // CHECK-MS64: #define _INTEGRAL_MAX_BITS 64 // CHECK-MS64: #define _MSC_EXTENSIONS 1 -// CHECK-MS64: #define _MSC_VER 1300 +// CHECK-MS64: #define _MSC_VER 1900 +// CHECK-MS64: #define _MSVC_LANG 201402L // CHECK-MS64: #define _M_AMD64 100 // CHECK-MS64: #define _M_X64 100 // CHECK-MS64: #define _WIN64 1 |