diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-03-22 23:00:19 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-03-22 23:00:19 +0000 |
commit | 5fdeae17da443c50c62f602733d06193a71b170f (patch) | |
tree | 058a31c30e66770f8154fa6922d52b76530db63d /lib/AST/ASTContext.cpp | |
parent | acddd2e5b91123ab43cef0dd74f7a1829f652458 (diff) |
Fix code to mark block variables as const to actually work. Fix
isObjCObjectPointerType to work with qualified types. Adjust test for
changes.
If the SemaExpr changes are wrong or break existing code, feel free to
delete the "ExprTy.addConst();" line and revert my changes to
test/Sema/block-literal.c.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67489 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ASTContext.cpp')
-rw-r--r-- | lib/AST/ASTContext.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index c5441dd304..c656d966db 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -2469,7 +2469,8 @@ bool ASTContext::isObjCObjectPointerType(QualType Ty) const { // Check to see if this is 'id' or 'Class', both of which are typedefs for // pointer types. This looks for the typedef specifically, not for the // underlying type. - if (Ty == getObjCIdType() || Ty == getObjCClassType()) + if (Ty.getUnqualifiedType() == getObjCIdType() || + Ty.getUnqualifiedType() == getObjCClassType()) return true; // If this a pointer to an interface (e.g. NSString*), it is ok. |