diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2009-09-03 00:43:07 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-09-03 00:43:07 +0000 |
| commit | f15d4b6050a96c3261ceeda7aacdb4a2168de0ab (patch) | |
| tree | d8240f03f4fced45920bd6bbf2bb930db7cfeafb /clang/lib/Sema/SemaExpr.cpp | |
| parent | ef3cf2a576d5e31ca5bb39a664e092496b6ed082 (diff) | |
| download | bcm5719-llvm-f15d4b6050a96c3261ceeda7aacdb4a2168de0ab.tar.gz bcm5719-llvm-f15d4b6050a96c3261ceeda7aacdb4a2168de0ab.zip | |
This patch does the following.
1) Issue digsnostics in non-fragile ABI, when an expression
evaluates to an interface type (except when it is used to
access a non-fragile ivar).
2) Issue unsupported error in fragile ABI when an expression
evaluates to an interface type (except when it is used to
access a fragile ivar).
llvm-svn: 80860
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 7072443829a..c01097e363c 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -5023,15 +5023,8 @@ QualType Sema::CheckIndirectionOperand(Expr *Op, SourceLocation OpLoc) { if (const PointerType *PT = Ty->getAs<PointerType>()) return PT->getPointeeType(); - if (const ObjCObjectPointerType *OPT = Ty->getAsObjCObjectPointerType()) { - QualType PTy = OPT->getPointeeType(); - if (LangOpts.ObjCNonFragileABI && PTy->isObjCInterfaceType()) { - Diag(OpLoc, diag::err_indirection_requires_nonfragile_object) - << Ty << Op->getSourceRange(); - return QualType(); - } - return PTy; - } + if (const ObjCObjectPointerType *OPT = Ty->getAsObjCObjectPointerType()) + return OPT->getPointeeType(); Diag(OpLoc, diag::err_typecheck_indirection_requires_pointer) << Ty << Op->getSourceRange(); |

