From 60ed560428fcc634df604dd23f873598d12a1a6d Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Wed, 19 Aug 2009 01:27:57 +0000 Subject: Introduce DeclaratorDecl and pass DeclaratorInfo through the Decl/Sema interfaces. DeclaratorDecl contains a DeclaratorInfo* to keep type source info. Subclasses of DeclaratorDecl are FieldDecl, FunctionDecl, and VarDecl. EnumConstantDecl still inherits from ValueDecl since it has no need for DeclaratorInfo. Decl/Sema interfaces accept a DeclaratorInfo as parameter but no DeclaratorInfo is created yet. llvm-svn: 79392 --- clang/lib/Sema/SemaDeclAttr.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'clang/lib/Sema/SemaDeclAttr.cpp') diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp index 76b99bb33f1..a840e6f5d1a 100644 --- a/clang/lib/Sema/SemaDeclAttr.cpp +++ b/clang/lib/Sema/SemaDeclAttr.cpp @@ -1863,11 +1863,12 @@ NamedDecl * Sema::DeclClonePragmaWeak(NamedDecl *ND, IdentifierInfo *II) if (FunctionDecl *FD = dyn_cast(ND)) { NewD = FunctionDecl::Create(FD->getASTContext(), FD->getDeclContext(), FD->getLocation(), DeclarationName(II), - FD->getType()); + FD->getType(), FD->getDeclaratorInfo()); } else if (VarDecl *VD = dyn_cast(ND)) { NewD = VarDecl::Create(VD->getASTContext(), VD->getDeclContext(), VD->getLocation(), II, - VD->getType(), VD->getStorageClass()); + VD->getType(), VD->getDeclaratorInfo(), + VD->getStorageClass()); } return NewD; } -- cgit v1.2.3