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;
diff --git a/Sema/SemaDecl.cpp b/Sema/SemaDecl.cpp
index a4c1a78..7914e86 100644
--- a/Sema/SemaDecl.cpp
+++ b/Sema/SemaDecl.cpp
@@ -794,11 +794,11 @@
              R.getAsString());
         InvalidDecl = true;
       }
-      NewVD = FileVarDecl::Create(D.getIdentifierLoc(), II, R, SC,
-                                  LastDeclarator, Context);
+      NewVD = FileVarDecl::Create(Context, D.getIdentifierLoc(), II, R, SC,
+                                  LastDeclarator);
     } else {
-      NewVD = BlockVarDecl::Create(D.getIdentifierLoc(), II, R, SC,
-                                   LastDeclarator, Context);
+      NewVD = BlockVarDecl::Create(Context, D.getIdentifierLoc(), II, R, SC,
+                                   LastDeclarator);
     }
     // Handle attributes prior to checking for duplicates in MergeVarDecl
     HandleDeclAttributes(NewVD, D.getDeclSpec().getAttributes(),
@@ -1017,8 +1017,8 @@
   } else if (parmDeclType->isFunctionType())
     parmDeclType = Context.getPointerType(parmDeclType);
   
-  ParmVarDecl *New = ParmVarDecl::Create(PI.IdentLoc, II, parmDeclType, 
-                                         VarDecl::None, 0, Context);
+  ParmVarDecl *New = ParmVarDecl::Create(Context, PI.IdentLoc, II, parmDeclType, 
+                                         VarDecl::None, 0);
   
   if (PI.InvalidType)
     New->setInvalidDecl();
@@ -1178,9 +1178,9 @@
   assert(!T.isNull() && "GetTypeForDeclarator() returned null type");
   
   // Scope manipulation handled by caller.
-  TypedefDecl *NewTD = TypedefDecl::Create(D.getIdentifierLoc(), 
+  TypedefDecl *NewTD = TypedefDecl::Create(Context, D.getIdentifierLoc(), 
                                            D.getIdentifier(), 
-                                           T, LastDeclarator, Context);
+                                           T, LastDeclarator);
   if (D.getInvalidType())
     NewTD->setInvalidDecl();
   return NewTD;
@@ -1259,7 +1259,7 @@
   case Decl::Enum:
     // FIXME: Tag decls should be chained to any simultaneous vardecls, e.g.:
     // enum X { A, B, C } D;    D should chain to X.
-    New = EnumDecl::Create(Loc, Name, 0, Context);
+    New = EnumDecl::Create(Context, Loc, Name, 0);
     // If this is an undefined enum, warn.
     if (TK != TK_Definition) Diag(Loc, diag::ext_forward_ref_enum);
     break;
@@ -1268,7 +1268,7 @@
   case Decl::Class:
     // FIXME: Tag decls should be chained to any simultaneous vardecls, e.g.:
     // struct X { int A; } D;    D should chain to X.
-    New = RecordDecl::Create(Kind, Loc, Name, 0, Context);
+    New = RecordDecl::Create(Context, Kind, Loc, Name, 0);
     break;
   }    
   
@@ -1582,8 +1582,8 @@
   }
   
   EnumConstantDecl *New = 
-    EnumConstantDecl::Create(IdLoc, Id, EltTy, Val, EnumVal, LastEnumConst,
-                             Context);
+    EnumConstantDecl::Create(Context, IdLoc, Id, EltTy, Val, EnumVal,
+                             LastEnumConst);
   
   // Register this decl in the current scope stack.
   New->setNext(Id->getFETokenInfo<ScopedDecl>());
diff --git a/Sema/SemaDeclObjC.cpp b/Sema/SemaDeclObjC.cpp
index 1e60a39..20d127b 100644
--- a/Sema/SemaDeclObjC.cpp
+++ b/Sema/SemaDeclObjC.cpp
@@ -823,9 +823,9 @@
       argType = QualType::getFromOpaquePtr(ArgTypes[i]);
     else
       argType = Context.getObjCIdType();
-    ParmVarDecl* Param = ParmVarDecl::Create(SourceLocation(/*FIXME*/),
+    ParmVarDecl* Param = ParmVarDecl::Create(Context, SourceLocation(/*FIXME*/),
                                              ArgNames[i], argType,
-                                             VarDecl::None, 0, Context);
+                                             VarDecl::None, 0);
     Param->setObjCDeclQualifier(
       CvtQTToAstBitMask(ArgQT[i].getObjCDeclQualifier()));
     Params.push_back(Param);