diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2012-11-29 03:13:49 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2012-11-29 03:13:49 +0000 |
commit | a70779f6b9a8135c3459bdeb1f0197b82ea0cb2a (patch) | |
tree | 5b65aee232647fda696692dd17ad5d901ccdb72d /lib/Sema/SemaPseudoObject.cpp | |
parent | afb49189d6962f3636d6a93d09c0b495e94ac782 (diff) |
Fix crash-on-invalid. <rdar://problem/12765391>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168851 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaPseudoObject.cpp')
-rw-r--r-- | lib/Sema/SemaPseudoObject.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Sema/SemaPseudoObject.cpp b/lib/Sema/SemaPseudoObject.cpp index 74d0818b0e..67bf742384 100644 --- a/lib/Sema/SemaPseudoObject.cpp +++ b/lib/Sema/SemaPseudoObject.cpp @@ -113,7 +113,7 @@ namespace { Expr *rebuildSpecific(ObjCPropertyRefExpr *refExpr) { // Fortunately, the constraint that we're rebuilding something // with a base limits the number of cases here. - assert(refExpr->getBase()); + assert(refExpr->isObjectReceiver()); if (refExpr->isExplicitProperty()) { return new (S.Context) @@ -713,10 +713,9 @@ ExprResult ObjCPropertyOpBuilder::buildSet(Expr *op, SourceLocation opcLoc, ExprResult ObjCPropertyOpBuilder::buildRValueOperation(Expr *op) { // Explicit properties always have getters, but implicit ones don't. // Check that before proceeding. - if (RefExpr->isImplicitProperty() && - !RefExpr->getImplicitPropertyGetter()) { + if (RefExpr->isImplicitProperty() && !RefExpr->getImplicitPropertyGetter()) { S.Diag(RefExpr->getLocation(), diag::err_getter_not_found) - << RefExpr->getBase()->getType(); + << RefExpr->getSourceRange(); return ExprError(); } |