aboutsummaryrefslogtreecommitdiff
path: root/Driver/RewriteTest.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2007-12-07 21:21:21 +0000
committerFariborz Jahanian <fjahanian@apple.com>2007-12-07 21:21:21 +0000
commit7dd82836dca87cf828ce994f161b53a34f6cdb7e (patch)
tree4cc414b8b9314d98501eba1bfa3d63413530a6e2 /Driver/RewriteTest.cpp
parent32c3904156d11e03cb59dcaf695d85b4be664bbd (diff)
Implemented when static typing is combined with protocols and use as receiver
type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44685 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver/RewriteTest.cpp')
-rw-r--r--Driver/RewriteTest.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Driver/RewriteTest.cpp b/Driver/RewriteTest.cpp
index 9c845a4473..2a189ad85b 100644
--- a/Driver/RewriteTest.cpp
+++ b/Driver/RewriteTest.cpp
@@ -1446,6 +1446,10 @@ Stmt *RewriteTest::RewriteMessageExpr(ObjCMessageExpr *Exp) {
SourceLocation());
MsgExprs.push_back(Unop);
} else {
+ // Remove all type-casts because it may contain objc-style types; e.g.
+ // Foo<Proto> *.
+ while (CastExpr *CE = dyn_cast<CastExpr>(recExpr))
+ recExpr = CE->getSubExpr();
recExpr = new CastExpr(Context->getObjcIdType(), recExpr, SourceLocation());
MsgExprs.push_back(recExpr);
}