[PATCH] Do not define __STRICT_ANSI__ in clang-cl

Ehsan Akhgari ehsan.akhgari at gmail.com
Mon Jun 30 12:55:45 PDT 2014


Moved the test.

http://reviews.llvm.org/D4350

Files:
  lib/Frontend/InitPreprocessor.cpp
  test/Preprocessor/predefined-macros.c

Index: lib/Frontend/InitPreprocessor.cpp
===================================================================
--- lib/Frontend/InitPreprocessor.cpp
+++ lib/Frontend/InitPreprocessor.cpp
@@ -433,7 +433,7 @@
   // Initialize language-specific preprocessor defines.
 
   // Standard conforming mode?
-  if (!LangOpts.GNUMode)
+  if (!LangOpts.GNUMode && !LangOpts.MSVCCompat)
     Builder.defineMacro("__STRICT_ANSI__");
 
   if (LangOpts.CPlusPlus11)
Index: test/Preprocessor/predefined-macros.c
===================================================================
--- test/Preprocessor/predefined-macros.c
+++ test/Preprocessor/predefined-macros.c
@@ -9,6 +9,7 @@
 // CHECK-MS: #define _M_IX86_FP
 // CHECK-MS: #define _WIN32 1
 // CHECK-MS-NOT: #define __GNUC__
+// CHECK-MS-NOT: #define __STRICT_ANSI__
 //
 // RUN: %clang_cc1 %s -E -dM -ffast-math -o - \
 // RUN:   | FileCheck %s --check-prefix=CHECK-FAST-MATH
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4350.10983.patch
Type: text/x-patch
Size: 912 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140630/3744444e/attachment.bin>


More information about the cfe-commits mailing list