[cfe-commits] r57209 - /cfe/trunk/lib/CodeGen/CGObjC.cpp
Ted Kremenek
kremenek at apple.com
Mon Oct 6 13:59:49 PDT 2008
Author: kremenek
Date: Mon Oct 6 15:59:48 2008
New Revision: 57209
URL: http://llvm.org/viewvc/llvm-project?rev=57209&view=rev
Log:
Use DeclStmt::getSolitaryDecl() instead of DeclStmt::getDecl() when processing the Decl of an Objective-C foreach statement.
Modified:
cfe/trunk/lib/CodeGen/CGObjC.cpp
Modified: cfe/trunk/lib/CodeGen/CGObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjC.cpp?rev=57209&r1=57208&r2=57209&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjC.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjC.cpp Mon Oct 6 15:59:48 2008
@@ -342,9 +342,9 @@
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;
More information about the cfe-commits
mailing list