summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/RewriteObjC.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-01-07 22:15:31 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-01-07 22:15:31 +0000
commit1444230c404e0c1b2c91d37ab75d40d13c13c470 (patch)
treec8788bbf2ea3876cbb87297cf81bac830535c579 /clang/lib/Frontend/RewriteObjC.cpp
parentdab2cd543f3b7631d7d7e88627873747fd324d9c (diff)
downloadbcm5719-llvm-1444230c404e0c1b2c91d37ab75d40d13c13c470.tar.gz
bcm5719-llvm-1444230c404e0c1b2c91d37ab75d40d13c13c470.zip
Fixes a bug in my last patch (related to radar 7490331).
llvm-svn: 92952
Diffstat (limited to 'clang/lib/Frontend/RewriteObjC.cpp')
-rw-r--r--clang/lib/Frontend/RewriteObjC.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Frontend/RewriteObjC.cpp b/clang/lib/Frontend/RewriteObjC.cpp
index 13de937141a..e087cbbcdc3 100644
--- a/clang/lib/Frontend/RewriteObjC.cpp
+++ b/clang/lib/Frontend/RewriteObjC.cpp
@@ -1185,7 +1185,7 @@ Stmt *RewriteObjC::RewriteObjCIvarRefExpr(ObjCIvarRefExpr *IV,
ObjCIvarDecl *D = IV->getDecl();
const Expr *BaseExpr = IV->getBase();
if (CurMethodDef) {
- if (IV->isArrow()) {
+ if (IV->isArrow() && isa<DeclRefExpr>(BaseExpr)) {
ObjCInterfaceType *iFaceDecl =
dyn_cast<ObjCInterfaceType>(BaseExpr->getType()->getPointeeType());
// lookup which class implements the instance variable.
OpenPOWER on IntegriCloud