diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2010-09-14 23:02:38 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-09-14 23:02:38 +0000 |
commit | 805b74ea30666507df898fef7319ae84634f7ba0 (patch) | |
tree | b3a75e5234a87ee87d8344a78c7acb10600783ac /clang/lib/AST/ExprClassification.cpp | |
parent | 1d8ab8a26b515742ad1e2da6cb1318e71609510a (diff) | |
download | bcm5719-llvm-805b74ea30666507df898fef7319ae84634f7ba0.tar.gz bcm5719-llvm-805b74ea30666507df898fef7319ae84634f7ba0.zip |
RHS of property expression assignment requires
copy initialization before passing it to
a setter. Fixes radar 8427922.
llvm-svn: 113885
Diffstat (limited to 'clang/lib/AST/ExprClassification.cpp')
-rw-r--r-- | clang/lib/AST/ExprClassification.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/AST/ExprClassification.cpp b/clang/lib/AST/ExprClassification.cpp index 6ca18a21ddc..b62a00f98e7 100644 --- a/clang/lib/AST/ExprClassification.cpp +++ b/clang/lib/AST/ExprClassification.cpp @@ -478,7 +478,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((isa<ObjCImplicitSetterGetterRefExpr>(E) || + assert((isa<ObjCImplicitSetterGetterRefExpr>(E) || + isa<ObjCPropertyRefExpr>(E) || !Ctx.getLangOptions().CPlusPlus) && "C++ struct assignment should be resolved by the " "copy assignment operator."); |