summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclAttr.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-08-19 01:27:57 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-08-19 01:27:57 +0000
commit60ed560428fcc634df604dd23f873598d12a1a6d (patch)
treeb80634730c953f366990cac57658332301732140 /clang/lib/Sema/SemaDeclAttr.cpp
parent3f79ad74054f1d7afe46f97e4f0f931835cfe6f1 (diff)
downloadbcm5719-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.cpp5
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;
}
OpenPOWER on IntegriCloud