diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-08-19 01:27:57 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-08-19 01:27:57 +0000 |
commit | 60ed560428fcc634df604dd23f873598d12a1a6d (patch) | |
tree | b80634730c953f366990cac57658332301732140 /clang/lib/Sema/SemaDeclAttr.cpp | |
parent | 3f79ad74054f1d7afe46f97e4f0f931835cfe6f1 (diff) | |
download | bcm5719-llvm-60ed560428fcc634df604dd23f873598d12a1a6d.tar.gz bcm5719-llvm-60ed560428fcc634df604dd23f873598d12a1a6d.zip |
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
Diffstat (limited to 'clang/lib/Sema/SemaDeclAttr.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDeclAttr.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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<FunctionDecl>(ND)) { NewD = FunctionDecl::Create(FD->getASTContext(), FD->getDeclContext(), FD->getLocation(), DeclarationName(II), - FD->getType()); + FD->getType(), FD->getDeclaratorInfo()); } else if (VarDecl *VD = dyn_cast<VarDecl>(ND)) { NewD = VarDecl::Create(VD->getASTContext(), VD->getDeclContext(), VD->getLocation(), II, - VD->getType(), VD->getStorageClass()); + VD->getType(), VD->getDeclaratorInfo(), + VD->getStorageClass()); } return NewD; } |