summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ExprClassification.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-09-09 23:01:10 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-09-09 23:01:10 +0000
commite89d03f619940dced72468711ea5b3f39a8f4f94 (patch)
tree313bcdde8c5582bcbe066e4a89701a4f87cdd037 /clang/lib/AST/ExprClassification.cpp
parent5cdaeaaa1d201d92659b7ee4f58adb63423ccde7 (diff)
downloadbcm5719-llvm-e89d03f619940dced72468711ea5b3f39a8f4f94.tar.gz
bcm5719-llvm-e89d03f619940dced72468711ea5b3f39a8f4f94.zip
property reference expression used on lhs of assignment
follows objective's semantics and is not overload'able with an assignment operator. Fixes a crash and a missing diagnostics. Radar 8379892. llvm-svn: 113555
Diffstat (limited to 'clang/lib/AST/ExprClassification.cpp')
-rw-r--r--clang/lib/AST/ExprClassification.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/AST/ExprClassification.cpp b/clang/lib/AST/ExprClassification.cpp
index d7e38ebbf5c..8ec81943b3f 100644
--- a/clang/lib/AST/ExprClassification.cpp
+++ b/clang/lib/AST/ExprClassification.cpp
@@ -420,7 +420,8 @@ static Cl::ModifiableType IsModifiable(ASTContext &Ctx, const Expr *E,
// Records with any const fields (recursively) are not modifiable.
if (const RecordType *R = CT->getAs<RecordType>()) {
- assert(!Ctx.getLangOptions().CPlusPlus &&
+ assert((isa<ObjCImplicitSetterGetterRefExpr>(E) ||
+ !Ctx.getLangOptions().CPlusPlus) &&
"C++ struct assignment should be resolved by the "
"copy assignment operator.");
if (R->hasConstFields())
OpenPOWER on IntegriCloud