This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] Include type name in Retain Count Checker diagnostics
ClosedPublic

Authored by zaks.anna on Dec 13 2016, 4:28 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

zaks.anna updated this revision to Diff 81327.Dec 13 2016, 4:28 PM
zaks.anna retitled this revision from to [analyzer] Include type name in Retain Count Checker diagnostics.
zaks.anna updated this object.
zaks.anna added a reviewer: dcoughlin.
zaks.anna added subscribers: cfe-commits, dcoughlin.
zaks.anna updated this revision to Diff 81429.Dec 14 2016, 11:45 AM

Devin did not like the '*' in the diagnostic for ObjC objects, so remove the '*'.

dcoughlin added inline comments.Dec 14 2016, 2:10 PM
lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
2000 ↗(On Diff #81429)

I think we should use this diagnostic text when type is not an ObjCObjectPointerType also. Where this matters, I think, is for id.

It seems weird to say "returns an instance of id"; I think it would be better in that case to say "returns an Objective-C object".

zaks.anna updated this revision to Diff 81482.Dec 14 2016, 2:50 PM

Address Devin's comment regarding 'id'.

dcoughlin accepted this revision.Dec 15 2016, 11:11 AM
dcoughlin edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Dec 15 2016, 11:11 AM
This revision was automatically updated to reflect the committed changes.