diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2010-08-16 21:51:12 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-08-16 21:51:12 +0000 |
| commit | 99311ba1a8d4356433518b773986276ee40799a1 (patch) | |
| tree | 28d3ac4affb39b173247c85ac989c08d41acb16b /clang/lib/Sema | |
| parent | c129cc18f0e90af148620b9deefdb46fa3407e76 (diff) | |
| download | bcm5719-llvm-99311ba1a8d4356433518b773986276ee40799a1.tar.gz bcm5719-llvm-99311ba1a8d4356433518b773986276ee40799a1.zip | |
Diagnose assiging to an interface object in
non-fragile abi mode as sizes are not statically known.
Fixes radar 8315734.
llvm-svn: 111191
Diffstat (limited to 'clang/lib/Sema')
| -rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 59d0328d6e1..42d1599e2e9 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -6538,6 +6538,11 @@ Action::OwningExprResult Sema::CreateBuiltinBinOp(SourceLocation OpLoc, } if (ResultTy.isNull()) return ExprError(); + if (ResultTy->isObjCObjectType() && LangOpts.ObjCNonFragileABI) { + if (Opc >= BinaryOperator::Assign && Opc <= BinaryOperator::OrAssign) + Diag(OpLoc, diag::err_assignment_requires_nonfragile_object) + << ResultTy; + } if (CompResultTy.isNull()) return Owned(new (Context) BinaryOperator(lhs, rhs, Opc, ResultTy, OpLoc)); else |

