This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] Remove dead code in ObjCDeallocChecker that checked for a missing [super dealloc] call
ClosedPublic

Authored by ddkilzer on Aug 21 2014, 4:54 PM.

Details

Reviewers
jordan_rose
Summary

This is now handled by Sema::ActOnFinishFunctionBody() before ObjCDeallocChecker::checkASTDecl() is called.

A test added to test/Analysis to exercise this code path just prints the newer warning from Sema::ActOnFinishFunctionBody().

Diff Detail

Event Timeline

ddkilzer updated this revision to Diff 12813.Aug 21 2014, 4:54 PM
ddkilzer retitled this revision from to [analyzer] Remove dead code in ObjCDeallocChecker that checked for a missing [super dealloc] call.
ddkilzer updated this object.
ddkilzer edited the test plan for this revision. (Show Details)
ddkilzer added a reviewer: jordan_rose.
ddkilzer set the repository for this revision to rL LLVM.
ddkilzer set the repository for this revision to rL LLVM.Aug 21 2014, 4:56 PM
ddkilzer added a subscriber: Unknown Object (MLST).
jordan_rose accepted this revision.Aug 21 2014, 7:38 PM
jordan_rose edited edge metadata.

Huh, I'm surprised and a bit concerned that we have no tests for this, but this seems reasonable. Thanks! Do you have commit access or do you need me to commit for you?

This revision is now accepted and ready to land.Aug 21 2014, 7:38 PM

I did try writing a test for this, but the diag::warn_objc_missing_super_dealloc message for the check in Sema::ActOnFinishFunctionBody() is printed instead of this one.

I do not have commit access. Please commit for me at your convenience. Thanks!

BTW, I'm happy to write a test under tests/Analysis if you'd like, but these tests appear to cover all cases:

test/SemaObjC/warn-missing-super.m
test/SemaObjCXX/warn-missing-super.mm
ddkilzer edited edge metadata.Aug 22 2014, 4:12 AM
ddkilzer updated this revision to Diff 12838.Aug 22 2014, 4:50 AM
ddkilzer updated this object.
ddkilzer edited the test plan for this revision. (Show Details)

Fix patch context by uploading through arc.

jordan_rose closed this revision.Aug 22 2014, 10:07 AM

Committed in r216272.