r212066 - Do not define __STRICT_ANSI__ in clang-cl
Ehsan Akhgari
ehsan.akhgari at gmail.com
Mon Jun 30 13:36:33 PDT 2014
Author: ehsan
Date: Mon Jun 30 15:36:33 2014
New Revision: 212066
URL: http://llvm.org/viewvc/llvm-project?rev=212066&view=rev
Log:
Do not define __STRICT_ANSI__ in clang-cl
Modified:
cfe/trunk/lib/Frontend/InitPreprocessor.cpp
cfe/trunk/test/Preprocessor/predefined-macros.c
Modified: cfe/trunk/lib/Frontend/InitPreprocessor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/InitPreprocessor.cpp?rev=212066&r1=212065&r2=212066&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/InitPreprocessor.cpp (original)
+++ cfe/trunk/lib/Frontend/InitPreprocessor.cpp Mon Jun 30 15:36:33 2014
@@ -478,7 +478,7 @@ static void InitializePredefinedMacros(c
// Initialize language-specific preprocessor defines.
// Standard conforming mode?
- if (!LangOpts.GNUMode)
+ if (!LangOpts.GNUMode && !LangOpts.MSVCCompat)
Builder.defineMacro("__STRICT_ANSI__");
if (LangOpts.CPlusPlus11)
Modified: cfe/trunk/test/Preprocessor/predefined-macros.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/predefined-macros.c?rev=212066&r1=212065&r2=212066&view=diff
==============================================================================
--- cfe/trunk/test/Preprocessor/predefined-macros.c (original)
+++ cfe/trunk/test/Preprocessor/predefined-macros.c Mon Jun 30 15:36:33 2014
@@ -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 -triple i686-pc-win32 -fms-compatibility \
// RUN: -o - | FileCheck %s --check-prefix=CHECK-MS-STDINT
More information about the cfe-commits
mailing list