aboutsummaryrefslogtreecommitdiff
path: root/Sema/SemaChecking.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2007-12-20 01:06:58 +0000
committerFariborz Jahanian <fjahanian@apple.com>2007-12-20 01:06:58 +0000
commit7359f04a80cae1dcbd944ee07eb50a27ce7f5077 (patch)
tree83ef1a052606d892956d61e6049af390e529bad9 /Sema/SemaChecking.cpp
parentfe23e217774aaec350086fab839210d7d9e1e3f4 (diff)
More objective-c typechecking stuff. This is work in progress and more patches
are due to arrive. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45244 91177308-0d34-0410-b5e6-96231b3b80d8
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);