aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/Expr.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-09-08 23:38:54 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-09-08 23:38:54 +0000
commit7f4f86a2167abc116275e49c81350fc3225485e5 (patch)
treea238134fc0c9ef5f9b61a8431c9578917dd88bc6 /lib/AST/Expr.cpp
parent7ef7f133dee7c2d5cfc97a9f6aa6dbc45435cb7b (diff)
More objc GC's API work for array of pointers declared
as __strong. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81283 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Expr.cpp')
-rw-r--r--lib/AST/Expr.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp
index 7171c79c44..013a9418f1 100644
--- a/lib/AST/Expr.cpp
+++ b/lib/AST/Expr.cpp
@@ -1092,7 +1092,7 @@ Expr::isModifiableLvalue(ASTContext &Ctx, SourceLocation *Loc) const {
}
/// isOBJCGCCandidate - Check if an expression is objc gc'able.
-///
+/// returns true, if it is; false otherwise.
bool Expr::isOBJCGCCandidate(ASTContext &Ctx) const {
switch (getStmtClass()) {
default:
@@ -1114,11 +1114,8 @@ bool Expr::isOBJCGCCandidate(ASTContext &Ctx) const {
if (VD->hasGlobalStorage())
return true;
QualType T = VD->getType();
- // dereferencing to an object pointer is always a gc'able candidate
- if (T->isPointerType() &&
- T->getAs<PointerType>()->getPointeeType()->isObjCObjectPointerType())
- return true;
-
+ // dereferencing to a pointer is always a gc'able candidate
+ return T->isPointerType();
}
return false;
}