diff options
author | Nico Weber <nicolasweber@gmx.de> | 2011-08-22 17:25:57 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2011-08-22 17:25:57 +0000 |
commit | 715abaf21390bb75eb1f822c41ee99408ed45045 (patch) | |
tree | 2fc35ccf936eb5a8aa44fa17df6f2fe3bedb372c /clang/lib/Sema/SemaExprObjC.cpp | |
parent | 41c6dcc7341db47e59e1cb3d60a08b420efd2bfc (diff) | |
download | bcm5719-llvm-715abaf21390bb75eb1f822c41ee99408ed45045.tar.gz bcm5719-llvm-715abaf21390bb75eb1f822c41ee99408ed45045.zip |
Warn on missing [super dealloc] calls.
This matches gcc's logic. Half of PR10661.
llvm-svn: 138240
Diffstat (limited to 'clang/lib/Sema/SemaExprObjC.cpp')
-rw-r--r-- | clang/lib/Sema/SemaExprObjC.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaExprObjC.cpp b/clang/lib/Sema/SemaExprObjC.cpp index e88726b6d2a..f3893ce2a58 100644 --- a/clang/lib/Sema/SemaExprObjC.cpp +++ b/clang/lib/Sema/SemaExprObjC.cpp @@ -975,6 +975,9 @@ ExprResult Sema::ActOnSuperMessage(Scope *S, // We are in a method whose class has a superclass, so 'super' // is acting as a keyword. if (Method->isInstanceMethod()) { + if (Sel.getMethodFamily() == OMF_dealloc) + ObjCShouldCallSuperDealloc = false; + // Since we are in an instance method, this is an instance // message to the superclass instance. QualType SuperTy = Context.getObjCInterfaceType(Super); |