Skip to content
Snippets Groups Projects
Commit 56ea94e0 authored by David Majnemer's avatar David Majnemer
Browse files

Sema: Predefine size_t in MSVC Compatibility mode

MSVC defines size_t without any explicit declarations.  This change
allows us to be compatible with TUs that depend on this declaration
appearing from nowhere.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199190 91177308-0d34-0410-b5e6-96231b3b80d8
parent 77d9faed
No related branches found
No related tags found
No related merge requests found
......@@ -182,6 +182,8 @@ void Sema::Initialize() {
if (IdResolver.begin(&Context.Idents.get("type_info")) == IdResolver.end())
PushOnScopeChains(Context.buildImplicitRecord("type_info", TTK_Class),
TUScope);
addImplicitTypedef("size_t", Context.getSizeType());
}
// Initialize predefined OpenCL types.
......
......@@ -24,6 +24,7 @@ void test()
namespace ms_predefined_types {
// ::type_info is a built-in forward class declaration.
void f(const type_info &a);
void f(size_t);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment