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
diff --git a/Sema/SemaChecking.cpp b/Sema/SemaChecking.cpp
index 0131410..0930439 100644
--- a/Sema/SemaChecking.cpp
+++ b/Sema/SemaChecking.cpp
@@ -594,7 +594,9 @@
 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 @@
       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);