aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-05-29 01:49:24 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-05-29 01:49:24 +0000
commitc1dc653b08226c1d8e1732f9d8b03b82869900bc (patch)
tree26654a45595980f57aa6c588fd89aee163e9fbf9 /lib/Sema/SemaDecl.cpp
parent402abb55fc2e0cdda5fb1ac90009b1f5f6774906 (diff)
If a declarator group declares a type, make sure to add that declaration
to the DeclGroup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72559 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 6a2e3099cd..8bd753abea 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -2754,10 +2754,14 @@ void Sema::ActOnUninitializedDecl(DeclPtrTy dcl) {
}
}
-Sema::DeclGroupPtrTy Sema::FinalizeDeclaratorGroup(Scope *S, DeclPtrTy *Group,
+Sema::DeclGroupPtrTy Sema::FinalizeDeclaratorGroup(Scope *S, const DeclSpec &DS,
+ DeclPtrTy *Group,
unsigned NumDecls) {
llvm::SmallVector<Decl*, 8> Decls;
-
+
+ if (DS.isTypeSpecOwned())
+ Decls.push_back((Decl*)DS.getTypeRep());
+
for (unsigned i = 0; i != NumDecls; ++i)
if (Decl *D = Group[i].getAs<Decl>())
Decls.push_back(D);