diff options
author | Nico Weber <nicolasweber@gmx.de> | 2011-08-28 22:35:17 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2011-08-28 22:35:17 +0000 |
commit | 1fb82667dd9a23fc2481194b342c74ca6fc321d1 (patch) | |
tree | 6dee0115cd87aea75135f8460777c11e90d97ac6 /clang/lib/Sema/SemaExprObjC.cpp | |
parent | 7881affdbf76a53bb71d4ebfa41e1fa8cf345ac6 (diff) | |
download | bcm5719-llvm-1fb82667dd9a23fc2481194b342c74ca6fc321d1.tar.gz bcm5719-llvm-1fb82667dd9a23fc2481194b342c74ca6fc321d1.zip |
Warn on missing [super finalize] calls.
This matches gcc's logic. Second half of PR10661.
llvm-svn: 138730
Diffstat (limited to 'clang/lib/Sema/SemaExprObjC.cpp')
-rw-r--r-- | clang/lib/Sema/SemaExprObjC.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaExprObjC.cpp b/clang/lib/Sema/SemaExprObjC.cpp index db5de4ca9c0..402e54c0e80 100644 --- a/clang/lib/Sema/SemaExprObjC.cpp +++ b/clang/lib/Sema/SemaExprObjC.cpp @@ -203,6 +203,7 @@ ExprResult Sema::ParseObjCSelectorExpression(Selector Sel, case OMF_None: case OMF_alloc: case OMF_copy: + case OMF_finalize: case OMF_init: case OMF_mutableCopy: case OMF_new: @@ -977,6 +978,8 @@ ExprResult Sema::ActOnSuperMessage(Scope *S, if (Method->isInstanceMethod()) { if (Sel.getMethodFamily() == OMF_dealloc) ObjCShouldCallSuperDealloc = false; + if (Sel.getMethodFamily() == OMF_finalize) + ObjCShouldCallSuperFinalize = false; // Since we are in an instance method, this is an instance // message to the superclass instance. @@ -1418,6 +1421,7 @@ ExprResult Sema::BuildInstanceMessage(Expr *Receiver, case OMF_None: case OMF_alloc: case OMF_copy: + case OMF_finalize: case OMF_mutableCopy: case OMF_new: case OMF_self: |