move the ASTContext argument to be first in the argument list of
all Create methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48398 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Sema/Sema.cpp b/Sema/Sema.cpp
index d854919..4bd04e3 100644
--- a/Sema/Sema.cpp
+++ b/Sema/Sema.cpp
@@ -59,16 +59,17 @@
TUScope->AddDecl(IDecl);
// Synthesize "typedef struct objc_selector *SEL;"
- RecordDecl *SelTag = RecordDecl::Create(Decl::Struct, SourceLocation(),
+ RecordDecl *SelTag = RecordDecl::Create(Context, Decl::Struct,
+ SourceLocation(),
&Context.Idents.get("objc_selector"),
- 0, Context);
+ 0);
SelTag->getIdentifier()->setFETokenInfo(SelTag);
TUScope->AddDecl(SelTag);
QualType SelT = Context.getPointerType(Context.getTagDeclType(SelTag));
- TypedefDecl *SelTypedef = TypedefDecl::Create(SourceLocation(),
+ TypedefDecl *SelTypedef = TypedefDecl::Create(Context, SourceLocation(),
&Context.Idents.get("SEL"),
- SelT, 0, Context);
+ SelT, 0);
SelTypedef->getIdentifier()->setFETokenInfo(SelTypedef);
TUScope->AddDecl(SelTypedef);
Context.setObjCSelType(SelTypedef);
@@ -97,12 +98,13 @@
// and make sure the decls get inserted into TUScope!
if (PP.getLangOptions().ObjC1) {
// Synthesize "typedef struct objc_class *Class;"
- RecordDecl *ClassTag = RecordDecl::Create(Decl::Struct, SourceLocation(),
- &IT.get("objc_class"), 0,Context);
+ RecordDecl *ClassTag = RecordDecl::Create(Context, Decl::Struct,
+ SourceLocation(),
+ &IT.get("objc_class"), 0);
QualType ClassT = Context.getPointerType(Context.getTagDeclType(ClassTag));
TypedefDecl *ClassTypedef =
- TypedefDecl::Create(SourceLocation(), &Context.Idents.get("Class"),
- ClassT, 0, Context);
+ TypedefDecl::Create(Context, SourceLocation(),
+ &Context.Idents.get("Class"), ClassT, 0);
Context.setObjCClassType(ClassTypedef);
// Synthesize "@class Protocol;
@@ -112,15 +114,15 @@
// Synthesize "typedef struct objc_object { Class isa; } *id;"
RecordDecl *ObjectTag =
- RecordDecl::Create(Decl::Struct, SourceLocation(), &IT.get("objc_object"),
- 0, Context);
+ RecordDecl::Create(Context, Decl::Struct, SourceLocation(),
+ &IT.get("objc_object"), 0);
FieldDecl *IsaDecl = new FieldDecl(SourceLocation(), 0,
Context.getObjCClassType());
ObjectTag->defineBody(&IsaDecl, 1);
QualType ObjT = Context.getPointerType(Context.getTagDeclType(ObjectTag));
- TypedefDecl *IdTypedef = TypedefDecl::Create(SourceLocation(),
+ TypedefDecl *IdTypedef = TypedefDecl::Create(Context, SourceLocation(),
&Context.Idents.get("id"),
- ObjT, 0, Context);
+ ObjT, 0);
Context.setObjCIdType(IdTypedef);
}
TUScope = 0;