]> granicus.if.org Git - clang/commitdiff
Add test for Windows predefined macros.
authorMichael J. Spencer <bigcheesegs@gmail.com>
Thu, 21 Oct 2010 05:23:48 +0000 (05:23 +0000)
committerMichael J. Spencer <bigcheesegs@gmail.com>
Thu, 21 Oct 2010 05:23:48 +0000 (05:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117000 91177308-0d34-0410-b5e6-96231b3b80d8

test/Preprocessor/predefined-macros.c [new file with mode: 0644]

diff --git a/test/Preprocessor/predefined-macros.c b/test/Preprocessor/predefined-macros.c
new file mode 100644 (file)
index 0000000..85a0cb8
--- /dev/null
@@ -0,0 +1,12 @@
+// This test verifies that the correct macros are predefined. It currently
+// only checks for Microsoft macros.
+
+// RUN: %clang_cc1 %s -E -dM -triple i686-pc-win32 -fms-extensions -fmsc-version=1300 -o - | FileCheck %s
+
+
+// CHECK: #define _INTEGRAL_MAX_BITS 64
+// CHECK: #define _MSC_EXTENSIONS 1
+// CHECK: #define _MSC_VER 1300
+// CHECK: #define _M_IX86 600
+// CHECK: #define _M_IX86_FP
+// CHECK: #define _WIN32 1