]> granicus.if.org Git - clang/commitdiff
Remove TypeSpecStartLocation from VarDecl/FunctionDecl/FieldDecl, and use DeclaratorI...
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Fri, 21 Aug 2009 00:31:54 +0000 (00:31 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Fri, 21 Aug 2009 00:31:54 +0000 (00:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79584 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/Decl.h
include/clang/AST/DeclTemplate.h
lib/AST/Decl.cpp
lib/AST/DeclTemplate.cpp
lib/CodeGen/CGBlocks.cpp
lib/Frontend/PCHReaderDecl.cpp
lib/Frontend/PCHWriterDecl.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclCXX.cpp
lib/Sema/SemaExprCXX.cpp
lib/Sema/SemaTemplateInstantiateDecl.cpp

index df3f13e223304248afb572420c44bdc60c5b355e..ae1b8bb25269b6bdfbffd44f2bcda903445bed16 100644 (file)
@@ -236,7 +236,9 @@ protected:
 public:
   DeclaratorInfo *getDeclaratorInfo() const { return DeclInfo; }
   void setDeclaratorInfo(DeclaratorInfo *DInfo) { DeclInfo = DInfo; }
-  
+
+  SourceLocation getTypeSpecStartLoc() const;
+
   // Implement isa/cast/dyncast/etc.
   static bool classof(const Decl *D) {
     return D->getKind() >= DeclaratorFirst && D->getKind() <= DeclaratorLast;
@@ -299,16 +301,13 @@ private:
   /// condition, e.g., if (int x = foo()) { ... }.
   bool DeclaredInCondition : 1;
 
-  // Move to DeclGroup when it is implemented.
-  SourceLocation TypeSpecStartLoc;
   friend class StmtIteratorBase;
 protected:
   VarDecl(Kind DK, DeclContext *DC, SourceLocation L, IdentifierInfo *Id,
-          QualType T, DeclaratorInfo *DInfo,
-          StorageClass SC, SourceLocation TSSL = SourceLocation())
+          QualType T, DeclaratorInfo *DInfo, StorageClass SC)
     : DeclaratorDecl(DK, DC, L, Id, T, DInfo), Init(),
       ThreadSpecified(false), HasCXXDirectInit(false),
-      DeclaredInCondition(false), TypeSpecStartLoc(TSSL) { 
+      DeclaredInCondition(false) { 
     SClass = SC; 
   }
 
@@ -326,8 +325,7 @@ public:
 
   static VarDecl *Create(ASTContext &C, DeclContext *DC,
                          SourceLocation L, IdentifierInfo *Id,
-                         QualType T, DeclaratorInfo *DInfo, StorageClass S,
-                         SourceLocation TypeSpecStartLoc = SourceLocation());
+                         QualType T, DeclaratorInfo *DInfo, StorageClass S);
 
   virtual ~VarDecl();
   virtual void Destroy(ASTContext& C);
@@ -337,12 +335,6 @@ public:
   
   virtual SourceRange getSourceRange() const;
 
-  //FIXME: Use DeclaratorInfo for this.
-  SourceLocation getTypeSpecStartLoc() const { return TypeSpecStartLoc; }
-  void setTypeSpecStartLoc(SourceLocation SL) {
-    TypeSpecStartLoc = SL;
-  }
-
   const Expr *getInit() const { 
     if (Init.isNull())
       return 0;
@@ -731,9 +723,6 @@ private:
   bool IsTrivial : 1; // sunk from CXXMethodDecl
   bool IsCopyAssignment : 1;  // sunk from CXXMethodDecl
   bool HasImplicitReturnZero : 1;
-
-  // Move to DeclGroup when it is implemented.
-  SourceLocation TypeSpecStartLoc;
   
   /// \brief End part of this FunctionDecl's source range.
   ///
@@ -763,8 +752,7 @@ private:
 protected:
   FunctionDecl(Kind DK, DeclContext *DC, SourceLocation L,
                DeclarationName N, QualType T, DeclaratorInfo *DInfo,
-               StorageClass S, bool isInline,
-               SourceLocation TSSL = SourceLocation())
+               StorageClass S, bool isInline)
     : DeclaratorDecl(DK, DC, L, N, T, DInfo), 
       DeclContext(DK),
       ParamInfo(0), Body(),
@@ -773,7 +761,7 @@ protected:
       HasWrittenPrototype(true), IsDeleted(false), IsTrivial(false),
       IsCopyAssignment(false),
       HasImplicitReturnZero(false),
-      TypeSpecStartLoc(TSSL), EndRangeLoc(L), TemplateOrSpecialization() {}
+      EndRangeLoc(L), TemplateOrSpecialization() {}
 
   virtual ~FunctionDecl() {}
   virtual void Destroy(ASTContext& C);
@@ -794,8 +782,7 @@ public:
                               DeclarationName N, QualType T,
                               DeclaratorInfo *DInfo,
                               StorageClass S = None, bool isInline = false,
-                              bool hasWrittenPrototype = true,
-                              SourceLocation TSStartLoc = SourceLocation());
+                              bool hasWrittenPrototype = true);
 
   virtual SourceRange getSourceRange() const {
     return SourceRange(getLocation(), EndRangeLoc);
@@ -803,10 +790,6 @@ public:
   void setLocEnd(SourceLocation E) {
     EndRangeLoc = E;
   }
-  
-  //FIXME: Use DeclaratorInfo for this.
-  SourceLocation getTypeSpecStartLoc() const { return TypeSpecStartLoc; }
-  void setTypeSpecStartLoc(SourceLocation TS) { TypeSpecStartLoc = TS; }
 
   /// getBody - Retrieve the body (definition) of the function. The
   /// function body might be in any of the (re-)declarations of this
@@ -1091,20 +1074,17 @@ class FieldDecl : public DeclaratorDecl {
   // FIXME: This can be packed into the bitfields in Decl.
   bool Mutable : 1;
   Expr *BitWidth;
-  SourceLocation TypeSpecStartLoc;
 protected:
   FieldDecl(Kind DK, DeclContext *DC, SourceLocation L, 
             IdentifierInfo *Id, QualType T, DeclaratorInfo *DInfo,
-            Expr *BW, bool Mutable, SourceLocation TSSL = SourceLocation())
-    : DeclaratorDecl(DK, DC, L, Id, T, DInfo), Mutable(Mutable), BitWidth(BW),
-      TypeSpecStartLoc(TSSL) { }
+            Expr *BW, bool Mutable)
+    : DeclaratorDecl(DK, DC, L, Id, T, DInfo), Mutable(Mutable), BitWidth(BW)
+      { }
 
 public:
   static FieldDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L, 
                            IdentifierInfo *Id, QualType T,
-                           DeclaratorInfo *DInfo, Expr *BW,
-                           bool Mutable,
-                           SourceLocation TypeSpecStartLoc = SourceLocation());
+                           DeclaratorInfo *DInfo, Expr *BW, bool Mutable);
 
   /// isMutable - Determines whether this field is mutable (C++ only).
   bool isMutable() const { return Mutable; }
@@ -1112,10 +1092,6 @@ public:
   /// \brief Set whether this field is mutable (C++ only).
   void setMutable(bool M) { Mutable = M; }
 
-  //FIXME: Use DeclaratorInfo for this.
-  SourceLocation getTypeSpecStartLoc() const { return TypeSpecStartLoc; }
-  void setTypeSpecStartLoc(SourceLocation TSSL) { TypeSpecStartLoc = TSSL; }
-
   /// isBitfield - Determines whether this field is a bitfield.
   bool isBitField() const { return BitWidth != NULL; }
 
index 14bf041b7a73b82009236ff3a8997b4c49976a4a..ac03a9ea31edb3e68482e5aa3fc48fcfdcf363a8 100644 (file)
@@ -747,17 +747,15 @@ class NonTypeTemplateParmDecl
 
   NonTypeTemplateParmDecl(DeclContext *DC, SourceLocation L, unsigned D,
                           unsigned P, IdentifierInfo *Id, QualType T,
-                          DeclaratorInfo *DInfo,
-                          SourceLocation TSSL = SourceLocation())
-    : VarDecl(NonTypeTemplateParm, DC, L, Id, T, DInfo, VarDecl::None, TSSL),
+                          DeclaratorInfo *DInfo)
+    : VarDecl(NonTypeTemplateParm, DC, L, Id, T, DInfo, VarDecl::None),
       TemplateParmPosition(D, P), DefaultArgument(0) 
   { }
 
 public:
   static NonTypeTemplateParmDecl *
   Create(ASTContext &C, DeclContext *DC, SourceLocation L, unsigned D,
-         unsigned P, IdentifierInfo *Id, QualType T, DeclaratorInfo *DInfo,
-         SourceLocation TypeSpecStartLoc = SourceLocation());
+         unsigned P, IdentifierInfo *Id, QualType T, DeclaratorInfo *DInfo);
 
   using TemplateParmPosition::getDepth;
   using TemplateParmPosition::getPosition;
index b41fae86b92fb4893cc40aaf6bf1436b63b74743..fc19e61a0997deddea59088880238bc0536c2d7a 100644 (file)
@@ -140,11 +140,9 @@ FunctionDecl *FunctionDecl::Create(ASTContext &C, DeclContext *DC,
                                    DeclarationName N, QualType T,
                                    DeclaratorInfo *DInfo,
                                    StorageClass S, bool isInline, 
-                                   bool hasWrittenPrototype,
-                                   SourceLocation TypeSpecStartLoc) {
+                                   bool hasWrittenPrototype) {
   FunctionDecl *New 
-    = new (C) FunctionDecl(Function, DC, L, N, T, DInfo, S, isInline, 
-                           TypeSpecStartLoc);
+    = new (C) FunctionDecl(Function, DC, L, N, T, DInfo, S, isInline);
   New->HasWrittenPrototype = hasWrittenPrototype;
   return New;
 }
@@ -155,9 +153,8 @@ BlockDecl *BlockDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L) {
 
 FieldDecl *FieldDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L,
                              IdentifierInfo *Id, QualType T,
-                             DeclaratorInfo *DInfo, Expr *BW,
-                             bool Mutable, SourceLocation TSSL) {
-  return new (C) FieldDecl(Decl::Field, DC, L, Id, T, DInfo, BW, Mutable, TSSL);
+                             DeclaratorInfo *DInfo, Expr *BW, bool Mutable) {
+  return new (C) FieldDecl(Decl::Field, DC, L, Id, T, DInfo, BW, Mutable);
 }
 
 bool FieldDecl::isAnonymousStructOrUnion() const {
@@ -316,14 +313,24 @@ NamedDecl *NamedDecl::getUnderlyingDecl() {
   }
 }
 
+//===----------------------------------------------------------------------===//
+// DeclaratorDecl Implementation
+//===----------------------------------------------------------------------===//
+
+SourceLocation DeclaratorDecl::getTypeSpecStartLoc() const {
+  if (DeclInfo)
+    return DeclInfo->getTypeLoc().getTypeSpecRange().getBegin();
+  return SourceLocation();
+}
+
 //===----------------------------------------------------------------------===//
 // VarDecl Implementation
 //===----------------------------------------------------------------------===//
 
 VarDecl *VarDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L,
                          IdentifierInfo *Id, QualType T, DeclaratorInfo *DInfo,
-                         StorageClass S, SourceLocation TypeSpecStartLoc) {
-  return new (C) VarDecl(Var, DC, L, Id, T, DInfo, S, TypeSpecStartLoc);
+                         StorageClass S) {
+  return new (C) VarDecl(Var, DC, L, Id, T, DInfo, S);
 }
 
 void VarDecl::Destroy(ASTContext& C) {
index c132749f409894e253c58c24a9e3448e9ffaa7ca..08e53eb0889ea1098bf2bfc8054260d17976d7b7 100644 (file)
@@ -236,10 +236,8 @@ NonTypeTemplateParmDecl *
 NonTypeTemplateParmDecl::Create(ASTContext &C, DeclContext *DC,
                                 SourceLocation L, unsigned D, unsigned P,
                                 IdentifierInfo *Id, QualType T,
-                                DeclaratorInfo *DInfo,
-                                SourceLocation TypeSpecStartLoc) {
-  return new (C) NonTypeTemplateParmDecl(DC, L, D, P, Id, T, DInfo,
-                                         TypeSpecStartLoc);
+                                DeclaratorInfo *DInfo) {
+  return new (C) NonTypeTemplateParmDecl(DC, L, D, P, Id, T, DInfo);
 }
 
 SourceLocation NonTypeTemplateParmDecl::getDefaultArgumentLoc() const {
index ad414b783b1c81546748b5658c7b6667f5f6bb2e..dad433f6283d8671fc12bba1fdcc56b9d563ea11 100644 (file)
@@ -694,8 +694,7 @@ uint64_t BlockFunction::getBlockOffset(const BlockDeclRefExpr *BDRE) {
                                                        llvm::APInt(32, Pad),
                                                        ArrayType::Normal, 0);
     ValueDecl *PadDecl = VarDecl::Create(getContext(), 0, SourceLocation(),
-                                         0, QualType(PadTy), 0, VarDecl::None,
-                                         SourceLocation());
+                                         0, QualType(PadTy), 0, VarDecl::None);
     Expr *E;
     E = new (getContext()) DeclRefExpr(PadDecl, PadDecl->getType(),
                                        SourceLocation(), false, false);
index 32e364af3776febeece90bbd79b68150f0d444e8..1e5233e2c46d7916adaed8e3b984d5d29d96edb3 100644 (file)
@@ -231,7 +231,6 @@ void PCHDeclReader::VisitFunctionDecl(FunctionDecl *FD) {
   FD->setHasInheritedPrototype(Record[Idx++]);
   FD->setHasWrittenPrototype(Record[Idx++]);
   FD->setDeleted(Record[Idx++]);
-  FD->setTypeSpecStartLoc(SourceLocation::getFromRawEncoding(Record[Idx++]));
   FD->setLocEnd(SourceLocation::getFromRawEncoding(Record[Idx++]));
   // FIXME: C++ TemplateOrInstantiation
   unsigned NumParams = Record[Idx++];
@@ -405,7 +404,6 @@ void PCHDeclReader::VisitObjCPropertyImplDecl(ObjCPropertyImplDecl *D) {
 void PCHDeclReader::VisitFieldDecl(FieldDecl *FD) {
   VisitDeclaratorDecl(FD);
   FD->setMutable(Record[Idx++]);
-  FD->setTypeSpecStartLoc(SourceLocation::getFromRawEncoding(Record[Idx++]));
   if (Record[Idx++])
     FD->setBitWidth(Reader.ReadDeclExpr());
 }
@@ -418,7 +416,6 @@ void PCHDeclReader::VisitVarDecl(VarDecl *VD) {
   VD->setDeclaredInCondition(Record[Idx++]);
   VD->setPreviousDeclaration(
                          cast_or_null<VarDecl>(Reader.GetDecl(Record[Idx++])));
-  VD->setTypeSpecStartLoc(SourceLocation::getFromRawEncoding(Record[Idx++]));
   if (Record[Idx++])
     VD->setInit(*Reader.getContext(), Reader.ReadDeclExpr());
 }
@@ -741,11 +738,11 @@ Decl *PCHReader::ReadDeclRecord(uint64_t Offset, unsigned Index) {
     break;
   case pch::DECL_FIELD:
     D = FieldDecl::Create(*Context, 0, SourceLocation(), 0, QualType(), 0, 0, 
-                          false, SourceLocation());
+                          false);
     break;
   case pch::DECL_VAR:
     D = VarDecl::Create(*Context, 0, SourceLocation(), 0, QualType(), 0,
-                        VarDecl::None, SourceLocation());
+                        VarDecl::None);
     break;
 
   case pch::DECL_IMPLICIT_PARAM:
index 4af13a012ab38c9b33e6fdacc1977269de0cf98a..c605148e2bf2319556770664ee30b20352c207f2 100644 (file)
@@ -229,7 +229,6 @@ void PCHDeclWriter::VisitFunctionDecl(FunctionDecl *D) {
   Record.push_back(D->hasInheritedPrototype());
   Record.push_back(D->hasWrittenPrototype());
   Record.push_back(D->isDeleted());
-  Writer.AddSourceLocation(D->getTypeSpecStartLoc(), Record);
   Writer.AddSourceLocation(D->getLocEnd(), Record);
   // FIXME: C++ TemplateOrInstantiation
   Record.push_back(D->param_size());
@@ -395,7 +394,6 @@ void PCHDeclWriter::VisitObjCPropertyImplDecl(ObjCPropertyImplDecl *D) {
 void PCHDeclWriter::VisitFieldDecl(FieldDecl *D) {
   VisitDeclaratorDecl(D);
   Record.push_back(D->isMutable());
-  Writer.AddSourceLocation(D->getTypeSpecStartLoc(), Record);
   Record.push_back(D->getBitWidth()? 1 : 0);
   if (D->getBitWidth())
     Writer.AddStmt(D->getBitWidth());
@@ -409,7 +407,6 @@ void PCHDeclWriter::VisitVarDecl(VarDecl *D) {
   Record.push_back(D->hasCXXDirectInitializer());
   Record.push_back(D->isDeclaredInCondition());
   Writer.AddDeclRef(D->getPreviousDeclaration(), Record);
-  Writer.AddSourceLocation(D->getTypeSpecStartLoc(), Record);
   Record.push_back(D->getInit()? 1 : 0);
   if (D->getInit())
     Writer.AddStmt(D->getInit());
@@ -524,7 +521,6 @@ void PCHWriter::WriteDeclsBlockAbbrevs() {
   Abv->Add(BitCodeAbbrevOp(0));                       // hasCXXDirectInitializer
   Abv->Add(BitCodeAbbrevOp(0));                       // isDeclaredInCondition
   Abv->Add(BitCodeAbbrevOp(0));                       // PrevDecl
-  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // TypeSpecStartLoc
   Abv->Add(BitCodeAbbrevOp(0));                       // HasInit
   // ParmVarDecl
   Abv->Add(BitCodeAbbrevOp(0));                       // ObjCDeclQualifier
index 060b4f436a783436038cacb45c4946fa95b05a13..153d5ab82bbd6eaef75874c0f5f465b62ee79ee0 100644 (file)
@@ -1509,9 +1509,10 @@ Sema::DeclPtrTy Sema::BuildAnonymousStructOrUnion(Scope *S, DeclSpec &DS,
   if (RecordDecl *OwningClass = dyn_cast<RecordDecl>(Owner)) {
     Anon = FieldDecl::Create(Context, OwningClass, Record->getLocation(),
                              /*IdentifierInfo=*/0, 
-                             Context.getTypeDeclType(Record), /*DInfo=*/0,
-                             /*BitWidth=*/0, /*Mutable=*/false,
-                             DS.getSourceRange().getBegin());
+                             Context.getTypeDeclType(Record),
+                             // FIXME: Type source info.
+                             /*DInfo=*/0,
+                             /*BitWidth=*/0, /*Mutable=*/false);
     Anon->setAccess(AS_public);
     if (getLangOptions().CPlusPlus)
       FieldCollector->Add(cast<FieldDecl>(Anon));
@@ -1536,8 +1537,10 @@ Sema::DeclPtrTy Sema::BuildAnonymousStructOrUnion(Scope *S, DeclSpec &DS,
 
     Anon = VarDecl::Create(Context, Owner, Record->getLocation(),
                            /*IdentifierInfo=*/0, 
-                           Context.getTypeDeclType(Record), /*DInfo=*/0,
-                           SC, DS.getSourceRange().getBegin());
+                           Context.getTypeDeclType(Record),
+                           // FIXME: Type source info.
+                           /*DInfo=*/0,
+                           SC);
   }
   Anon->setImplicit();
 
@@ -2151,9 +2154,7 @@ Sema::ActOnVariableDeclarator(Scope* S, Declarator& D, DeclContext* DC,
   }        
   
   NewVD = VarDecl::Create(Context, DC, D.getIdentifierLoc(), 
-                          II, R, DInfo, SC, 
-                          // FIXME: Move to DeclGroup...
-                          D.getDeclSpec().getSourceRange().getBegin());
+                          II, R, DInfo, SC);
 
   if (D.isInvalidType())
     NewVD->setInvalidDecl();
@@ -2459,9 +2460,7 @@ Sema::ActOnFunctionDeclarator(Scope* S, Declarator& D, DeclContext* DC,
       // code path.
       NewFD = FunctionDecl::Create(Context, DC, D.getIdentifierLoc(),
                                    Name, R, DInfo, SC, isInline, 
-                                   /*hasPrototype=*/true,
-                                   // FIXME: Move to DeclGroup...
-                                   D.getDeclSpec().getSourceRange().getBegin());
+                                   /*hasPrototype=*/true);
       D.setInvalidType();
     }
   } else if (D.getKind() == Declarator::DK_Conversion) {
@@ -2510,9 +2509,7 @@ Sema::ActOnFunctionDeclarator(Scope* S, Declarator& D, DeclContext* DC,
     
     NewFD = FunctionDecl::Create(Context, DC,
                                  D.getIdentifierLoc(),
-                                 Name, R, DInfo, SC, isInline, HasPrototype,
-                                 // FIXME: Move to DeclGroup...
-                                 D.getDeclSpec().getSourceRange().getBegin());
+                                 Name, R, DInfo, SC, isInline, HasPrototype);
   }
 
   if (D.isInvalidType())
@@ -4546,7 +4543,7 @@ FieldDecl *Sema::CheckFieldDecl(DeclarationName Name, QualType T,
   }
   
   FieldDecl *NewFD = FieldDecl::Create(Context, Record, Loc, II, T, DInfo,
-                                       BitWidth, Mutable, TSSL);
+                                       BitWidth, Mutable);
   if (InvalidDecl)
     NewFD->setInvalidDecl();
 
index 2edfea1172fed340d959f3c2885c5b863357435d..15d32b08a7df18b9aaabb754730f436afe318658 100644 (file)
@@ -3279,8 +3279,7 @@ VarDecl *Sema::BuildExceptionDeclaration(Scope *S, QualType ExDeclType,
   // FIXME: Need to check for abstract classes.
 
   VarDecl *ExDecl = VarDecl::Create(Context, CurContext, Loc, 
-                                    Name, ExDeclType, DInfo, VarDecl::None, 
-                                    Range.getBegin());
+                                    Name, ExDeclType, DInfo, VarDecl::None);
 
   if (Invalid)
     ExDecl->setInvalidDecl();
index 7c3f7ecaabd7ebb891df7963063c7e59b2711faa..7540dff44ad9163829752d3f1f85f1b92babe861 100644 (file)
@@ -676,8 +676,7 @@ void Sema::DeclareGlobalAllocationFunction(DeclarationName Name,
   QualType FnType = Context.getFunctionType(Return, &Argument, 1, false, 0);
   FunctionDecl *Alloc =
     FunctionDecl::Create(Context, GlobalCtx, SourceLocation(), Name,
-                         FnType, /*DInfo=*/0, FunctionDecl::None, false, true,
-                         SourceLocation());
+                         FnType, /*DInfo=*/0, FunctionDecl::None, false, true);
   Alloc->setImplicit();
   ParmVarDecl *Param = ParmVarDecl::Create(Context, Alloc, SourceLocation(),
                                            0, Argument, /*DInfo=*/0,
index 8d75ac463ab78ac180bff071d8b14dd8c3c60407..078c32b4398fb8961f3e429c9f1d7623aaeeaf57 100644 (file)
@@ -125,7 +125,7 @@ Decl *TemplateDeclInstantiator::VisitVarDecl(VarDecl *D) {
   VarDecl *Var = VarDecl::Create(SemaRef.Context, Owner,
                                  D->getLocation(), D->getIdentifier(),
                                  T, D->getDeclaratorInfo(),
-                                 D->getStorageClass(),D->getTypeSpecStartLoc());
+                                 D->getStorageClass());
   Var->setThreadSpecified(D->isThreadSpecified());
   Var->setCXXDirectInitializer(D->hasCXXDirectInitializer());
   Var->setDeclaredInCondition(D->isDeclaredInCondition());
@@ -416,8 +416,7 @@ Decl *TemplateDeclInstantiator::VisitFunctionDecl(FunctionDecl *D) {
       FunctionDecl::Create(SemaRef.Context, Owner, D->getLocation(), 
                            D->getDeclName(), T, D->getDeclaratorInfo(),
                            D->getStorageClass(),
-                           D->isInline(), D->hasWrittenPrototype(),
-                           D->getTypeSpecStartLoc());
+                           D->isInline(), D->hasWrittenPrototype());
   }
   
   // Attach the parameters