aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExprObjC.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2011-08-28 22:35:17 +0000
committerNico Weber <nicolasweber@gmx.de>2011-08-28 22:35:17 +0000
commit80cb6e69d9e85231588ae604e4bc2bc9a07389af (patch)
tree111a0d0d921aa094530bfdb2ebf4a49f7352b6c6 /lib/Sema/SemaExprObjC.cpp
parentf5e39ece75b18c9ce19351929d4879ad9731e7f5 (diff)
Warn on missing [super finalize] calls.
This matches gcc's logic. Second half of PR10661. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138730 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExprObjC.cpp')
-rw-r--r--lib/Sema/SemaExprObjC.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Sema/SemaExprObjC.cpp b/lib/Sema/SemaExprObjC.cpp
index db5de4ca9c..402e54c0e8 100644
--- a/lib/Sema/SemaExprObjC.cpp
+++ b/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: