diff options
author | David Chisnall <csdavec@swan.ac.uk> | 2009-08-17 16:35:33 +0000 |
---|---|---|
committer | David Chisnall <csdavec@swan.ac.uk> | 2009-08-17 16:35:33 +0000 |
commit | 9f57c29053af89e0b229661d1b67befcd8f0c35c (patch) | |
tree | 13a2ba18f6fa4ac8a093be5d8f6a1e57862ac022 /clang/lib/Sema/SemaChecking.cpp | |
parent | d813cbfe721ad70c8a9d9cd1f274c6d20e4e4411 (diff) | |
download | bcm5719-llvm-9f57c29053af89e0b229661d1b67befcd8f0c35c.tar.gz bcm5719-llvm-9f57c29053af89e0b229661d1b67befcd8f0c35c.zip |
Initial patch to support definitions of id and Class from headers in Objective-C code.
This currently breaks test/SemaObjC/id-isa-ref.m and issues some spurious warnings when you attempt to assign a struct objc_class* value to a Class variable. The test case probably should fail as it's written, because without the definition of Class the compiler should not assume struct objc_class* is a valid receiver type, but it's left broken because it would be nice if we could get that passing too for the special case of isa.
Approved by snaroff.
llvm-svn: 79248
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
-rw-r--r-- | clang/lib/Sema/SemaChecking.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index 612c4dc4cbf..5499e6cb4ed 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -1257,7 +1257,7 @@ Sema::CheckReturnStackAddr(Expr *RetValExp, QualType lhsType, /// * taking the address of an array element where the array is on the stack static DeclRefExpr* EvalAddr(Expr *E) { // We should only be called for evaluating pointer expressions. - assert((E->getType()->isPointerType() || + assert((E->getType()->isAnyPointerType() || E->getType()->isBlockPointerType() || E->getType()->isObjCQualifiedIdType()) && "EvalAddr only works on pointers"); |