diff options
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/CodeGen/CGObjC.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp index c389adba584..9849fb61b6b 100644 --- a/clang/lib/CodeGen/CGObjC.cpp +++ b/clang/lib/CodeGen/CGObjC.cpp @@ -342,9 +342,9 @@ void CodeGenFunction::EmitObjCForCollectionStmt(const ObjCForCollectionStmt &S) if (const DeclStmt *SD = dyn_cast<DeclStmt>(S.getElement())) { EmitStmt(SD); - - ElementTy = cast<ValueDecl>(SD->getDecl())->getType(); - DeclAddress = LocalDeclMap[SD->getDecl()]; + const ScopedDecl* D = SD->getSolitaryDecl(); + ElementTy = cast<ValueDecl>(D)->getType(); + DeclAddress = LocalDeclMap[D]; } else { ElementTy = cast<Expr>(S.getElement())->getType(); DeclAddress = 0; |

