Summary:
This change adds more test cases for the default MSVC compatibility version:
1. When -fms-extensions is supplied, but -fmsc-version and
-fms-compatibility-version are not.
2. With the target triple specifies an MSVC environment, but no other
-fms* flags.
Reviewers: rnk, llvm-commits
Subscribers: hans, compnerd, amccarth
Differential Revision: https://reviews.llvm.org/D27498
llvm-svn: 288997
// CHECK-MSC-15-NOT: "-fmsc-version=150020706"
// CHECK-MSC-15: "-fms-compatibility-version=15.0.20706"
+//
+// Verify default version with -fms-extensions
+//
+
+// RUN: %clang -target i686-windows -fms-extensions -dM -E - </dev/null -o - | FileCheck %s -check-prefix CHECK-MS-EXTENSIONS
+
+// CHECK-MS-EXTENSIONS: _MSC_BUILD 1
+// CHECK-MS-EXTENSIONS: _MSC_FULL_VER {{..}}000000
+// CHECK-MS-EXTENSIONS: _MSC_VER {{..}}00
// RUN: %clang -target i686-pc-windows-msvc19 -S -emit-llvm %s -o - | FileCheck %s --check-prefix=TARGET-19
// RUN: %clang -target i686-pc-windows-msvc -S -emit-llvm %s -o - -fms-compatibility-version=19 | FileCheck %s --check-prefix=OVERRIDE-19
// RUN: %clang -target i686-pc-windows-msvc-elf -S -emit-llvm %s -o - | FileCheck %s --check-prefix=ELF-DEFAULT
+// RUN: %clang -target i686-pc-windows-msvc -S -emit-llvm %s -o - | FileCheck %s --check-prefix=DEFAULT
// TARGET-19: target triple = "i686-pc-windows-msvc19.0.0"
// OVERRIDE-19: target triple = "i686-pc-windows-msvc19.0.0"
// ELF-DEFAULT: target triple = "i686-pc-windows-msvc{{.*}}-elf"
+// DEFAULT: target triple = "i686-pc-windows-msvc{{[^-]+}}"