r229616 - Sema: size_t is available in C when -fms-compatibility is enabled
David Majnemer
david.majnemer at gmail.com
Tue Feb 17 18:28:14 PST 2015
Author: majnemer
Date: Tue Feb 17 20:28:13 2015
New Revision: 229616
URL: http://llvm.org/viewvc/llvm-project?rev=229616&view=rev
Log:
Sema: size_t is available in C when -fms-compatibility is enabled
Modified:
cfe/trunk/lib/Sema/Sema.cpp
cfe/trunk/test/Sema/MicrosoftCompatibility.c
Modified: cfe/trunk/lib/Sema/Sema.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/Sema.cpp?rev=229616&r1=229615&r2=229616&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/Sema.cpp (original)
+++ cfe/trunk/lib/Sema/Sema.cpp Tue Feb 17 20:28:13 2015
@@ -193,8 +193,9 @@ void Sema::Initialize() {
}
// Initialize Microsoft "predefined C++ types".
- if (PP.getLangOpts().MSVCCompat && PP.getLangOpts().CPlusPlus) {
- if (IdResolver.begin(&Context.Idents.get("type_info")) == IdResolver.end())
+ if (PP.getLangOpts().MSVCCompat) {
+ if (PP.getLangOpts().CPlusPlus &&
+ IdResolver.begin(&Context.Idents.get("type_info")) == IdResolver.end())
PushOnScopeChains(Context.buildImplicitRecord("type_info", TTK_Class),
TUScope);
Modified: cfe/trunk/test/Sema/MicrosoftCompatibility.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/MicrosoftCompatibility.c?rev=229616&r1=229615&r2=229616&view=diff
==============================================================================
--- cfe/trunk/test/Sema/MicrosoftCompatibility.c (original)
+++ cfe/trunk/test/Sema/MicrosoftCompatibility.c Tue Feb 17 20:28:13 2015
@@ -21,3 +21,5 @@ struct __declspec(aligned) S2 {}; /* exp
struct __declspec(appdomain) S3 {}; /* expected-warning {{__declspec attribute 'appdomain' is not supported}} */
__declspec(__noreturn__) void f7(void); /* expected-warning {{__declspec attribute '__noreturn__' is not supported}} */
+
+size_t x;
More information about the cfe-commits
mailing list