aboutsummaryrefslogtreecommitdiff
path: root/Sema/SemaChecking.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Sema/SemaChecking.cpp')
-rw-r--r--Sema/SemaChecking.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/Sema/SemaChecking.cpp b/Sema/SemaChecking.cpp
index 01314102d4..09304399e9 100644
--- a/Sema/SemaChecking.cpp
+++ b/Sema/SemaChecking.cpp
@@ -594,7 +594,9 @@ Sema::CheckReturnStackAddr(Expr *RetValExp, QualType lhsType,
static DeclRefExpr* EvalAddr(Expr *E) {
// We should only be called for evaluating pointer expressions.
- assert (E->getType()->isPointerType() && "EvalAddr only works on pointers");
+ assert ((E->getType()->isPointerType() ||
+ E->getType()->isObjcQualifiedIdType())
+ && "EvalAddr only works on pointers");
// Our "symbolic interpreter" is just a dispatch off the currently
// viewed AST node. We then recursively traverse the AST by calling
@@ -654,7 +656,8 @@ static DeclRefExpr* EvalAddr(Expr *E) {
ImplicitCastExpr *IE = cast<ImplicitCastExpr>(E);
Expr* SubExpr = IE->getSubExpr();
- if (SubExpr->getType()->isPointerType())
+ if (SubExpr->getType()->isPointerType() ||
+ SubExpr->getType()->isObjcQualifiedIdType())
return EvalAddr(SubExpr);
else
return EvalVal(SubExpr);