aboutsummaryrefslogtreecommitdiff
path: root/Driver/RewriteTest.cpp
diff options
context:
space:
mode:
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);
}