diff options
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/CodeGen/ModuleBuilder.cpp | 6 | ||||
| -rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 5 |
2 files changed, 3 insertions, 8 deletions
diff --git a/clang/lib/CodeGen/ModuleBuilder.cpp b/clang/lib/CodeGen/ModuleBuilder.cpp index 9afdc0368c4..3e3f5e463f5 100644 --- a/clang/lib/CodeGen/ModuleBuilder.cpp +++ b/clang/lib/CodeGen/ModuleBuilder.cpp @@ -68,12 +68,8 @@ namespace { virtual void HandleTopLevelDecl(Decl *D) { // Make sure to emit all elements of a Decl. - if (Decl *SD = dyn_cast<Decl>(D)) { - for (; SD; SD = SD->getNextDeclarator()) - Builder->EmitTopLevelDecl(SD); - } else { + for (; D; D = D->getNextDeclarator()) Builder->EmitTopLevelDecl(D); - } } /// HandleTagDeclDefinition - This callback is invoked each time a TagDecl diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 5eb2e6a95ba..0d4f562db18 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -2552,11 +2552,10 @@ void Sema::ActOnUninitializedDecl(DeclTy *dcl) { /// The declarators are chained together backwards, reverse the list. Sema::DeclTy *Sema::FinalizeDeclaratorGroup(Scope *S, DeclTy *group) { // Often we have single declarators, handle them quickly. - Decl *GroupDecl = static_cast<Decl*>(group); - if (GroupDecl == 0) + Decl *Group = static_cast<Decl*>(group); + if (Group == 0) return 0; - Decl *Group = dyn_cast<Decl>(GroupDecl); Decl *NewGroup = 0; if (Group->getNextDeclarator() == 0) NewGroup = Group; |

