aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.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/SemaDecl.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/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 8f08af4778..2f2ba7f8e6 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -6674,12 +6674,18 @@ Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt *Body,
Diag(MD->getLocEnd(), diag::warn_objc_missing_super_dealloc);
ObjCShouldCallSuperDealloc = false;
}
+ if (ObjCShouldCallSuperFinalize) {
+ Diag(MD->getLocEnd(), diag::warn_objc_missing_super_finalize);
+ ObjCShouldCallSuperFinalize = false;
+ }
} else {
return 0;
}
assert(!ObjCShouldCallSuperDealloc && "This should only be set for "
"ObjC methods, which should have been handled in the block above.");
+ assert(!ObjCShouldCallSuperFinalize && "This should only be set for "
+ "ObjC methods, which should have been handled in the block above.");
// Verify and clean out per-function state.
if (Body) {