summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index beffe414f56..a2e05e0094f 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -8814,21 +8814,13 @@ Sema::DeclGroupPtrTy Sema::FinalizeDeclaratorGroup(Scope *S, const DeclSpec &DS,
if (DS.isTypeSpecOwned())
Decls.push_back(DS.getRepAsDecl());
- DeclaratorDecl *FirstDeclaratorInGroup = 0;
for (unsigned i = 0, e = Group.size(); i != e; ++i)
- if (Decl *D = Group[i]) {
- if (DeclaratorDecl *DD = dyn_cast<DeclaratorDecl>(D))
- if (!FirstDeclaratorInGroup)
- FirstDeclaratorInGroup = DD;
+ if (Decl *D = Group[i])
Decls.push_back(D);
- }
if (DeclSpec::isDeclRep(DS.getTypeSpecType())) {
- if (TagDecl *Tag = dyn_cast_or_null<TagDecl>(DS.getRepAsDecl())) {
+ if (const TagDecl *Tag = dyn_cast_or_null<TagDecl>(DS.getRepAsDecl()))
HandleTagNumbering(*this, Tag);
- if (!Tag->hasNameForLinkage() && !Tag->hasDeclaratorForAnonDecl())
- Tag->setDeclaratorForAnonDecl(FirstDeclaratorInGroup);
- }
}
return BuildDeclaratorGroup(Decls, DS.containsPlaceholderType());
OpenPOWER on IntegriCloud