Page MenuHomePhabricator

Refactor: Simplify boolean conditional return statements in lib/ARCMigrate
ClosedPublic

Authored by LegalizeAdulthood on May 25 2015, 12:32 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

LegalizeAdulthood retitled this revision from to Refactor: Simplify boolean conditional return statements in lib/ARCMigrate.
LegalizeAdulthood updated this object.
LegalizeAdulthood edited the test plan for this revision. (Show Details)
LegalizeAdulthood added a subscriber: Unknown Object (MLST).
aaron.ballman edited edge metadata.May 26 2015, 6:09 AM

LGTM!

~Aaron

alexfh added a subscriber: alexfh.May 26 2015, 7:00 AM
alexfh added inline comments.
lib/ARCMigrate/TransRetainReleaseDealloc.cpp
177 ↗(On Diff #26475)

I'd replace both ifs with return isPlusOneAssignBeforeOrAfterAutorelease(E) || isReturnedAfterAutorelease(E);.

226 ↗(On Diff #26475)

I'd replace both ifs with return RefD == getReferencedDecl(Bop->getLHS()) && isPlusOneAssign(Bop);

aaron.ballman resigned from this revision.Oct 13 2015, 5:56 AM
aaron.ballman removed a reviewer: aaron.ballman.
This revision was automatically updated to reflect the committed changes.