Eliminate a bunch of unnecessary ASTContexts from members functions of
Decl subclasses. No functionality change.

llvm-svn: 95841
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp
index 80c1244..4851636 100644
--- a/clang/lib/AST/Decl.cpp
+++ b/clang/lib/AST/Decl.cpp
@@ -717,10 +717,10 @@
   return 0;
 }
 
-void VarDecl::setInit(ASTContext &C, Expr *I) {
+void VarDecl::setInit(Expr *I) {
   if (EvaluatedStmt *Eval = Init.dyn_cast<EvaluatedStmt *>()) {
     Eval->~EvaluatedStmt();
-    C.Deallocate(Eval);
+    getASTContext().Deallocate(Eval);
   }
 
   Init = I;
@@ -984,14 +984,13 @@
 
 }
 
-void FunctionDecl::setParams(ASTContext& C, ParmVarDecl **NewParamInfo,
-                             unsigned NumParams) {
+void FunctionDecl::setParams(ParmVarDecl **NewParamInfo, unsigned NumParams) {
   assert(ParamInfo == 0 && "Already has param info!");
   assert(NumParams == getNumParams() && "Parameter count mismatch!");
 
   // Zero params -> null pointer.
   if (NumParams) {
-    void *Mem = C.Allocate(sizeof(ParmVarDecl*)*NumParams);
+    void *Mem = getASTContext().Allocate(sizeof(ParmVarDecl*)*NumParams);
     ParamInfo = new (Mem) ParmVarDecl*[NumParams];
     memcpy(ParamInfo, NewParamInfo, sizeof(ParmVarDecl*)*NumParams);
 
@@ -1228,8 +1227,7 @@
 }
 
 void
-FunctionDecl::setFunctionTemplateSpecialization(ASTContext &Context,
-                                                FunctionTemplateDecl *Template,
+FunctionDecl::setFunctionTemplateSpecialization(FunctionTemplateDecl *Template,
                                      const TemplateArgumentList *TemplateArgs,
                                                 void *InsertPos,
                                               TemplateSpecializationKind TSK) {
@@ -1238,7 +1236,7 @@
   FunctionTemplateSpecializationInfo *Info
     = TemplateOrSpecialization.dyn_cast<FunctionTemplateSpecializationInfo*>();
   if (!Info)
-    Info = new (Context) FunctionTemplateSpecializationInfo;
+    Info = new (getASTContext()) FunctionTemplateSpecializationInfo;
 
   Info->Function = this;
   Info->Template.setPointer(Template);
@@ -1436,8 +1434,7 @@
   Decl::Destroy(C);
 }
 
-void EnumDecl::completeDefinition(ASTContext &C,
-                                  QualType NewType,
+void EnumDecl::completeDefinition(QualType NewType,
                                   QualType NewPromotionType) {
   assert(!isDefinition() && "Cannot redefine enums!");
   IntegerType = NewType;
@@ -1482,7 +1479,7 @@
 
 /// completeDefinition - Notes that the definition of this type is now
 /// complete.
-void RecordDecl::completeDefinition(ASTContext& C) {
+void RecordDecl::completeDefinition() {
   assert(!isDefinition() && "Cannot redefine record!");
   TagDecl::completeDefinition();
 }
@@ -1505,14 +1502,14 @@
   Decl::Destroy(C);
 }
 
-void BlockDecl::setParams(ASTContext& C, ParmVarDecl **NewParamInfo,
+void BlockDecl::setParams(ParmVarDecl **NewParamInfo,
                           unsigned NParms) {
   assert(ParamInfo == 0 && "Already has param info!");
 
   // Zero params -> null pointer.
   if (NParms) {
     NumParams = NParms;
-    void *Mem = C.Allocate(sizeof(ParmVarDecl*)*NumParams);
+    void *Mem = getASTContext().Allocate(sizeof(ParmVarDecl*)*NumParams);
     ParamInfo = new (Mem) ParmVarDecl*[NumParams];
     memcpy(ParamInfo, NewParamInfo, sizeof(ParmVarDecl*)*NumParams);
   }