[PATCH] D27408: [analyzer] RetainCountChecker: remove unused enum value; NFC.

Devin Coughlin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 5 09:29:10 PST 2016


dcoughlin added inline comments.


================
Comment at: include/clang/StaticAnalyzer/Checkers/ObjCRetainCount.h:179
   
-  static RetEffect MakeOwned(ObjKind o, bool isAllocated = false) {
-    return RetEffect(isAllocated ? OwnedAllocatedSymbol : OwnedSymbol, o);
+  static RetEffect MakeOwned(ObjKind o) {
+    return RetEffect(OwnedAllocatedSymbol, o);
----------------
zaks.anna wrote:
> Should we rename into MakeAllocatedOwned()?
I think the current use of 'OwnedAllocatedSymbol' more closely matches what is conveyed by the name and documentation of 'OwnedSymbol', so it might be better to remove 'OwnedSymbol' (as Artem has done) and then immediately rename all occurrences of 'OwnedAllocatedSymbol' to 'OwnedSymbol'. There are plenty of places where the analyzer doesn't see the allocation site and yet yields 'OwnedAllocatedSymbol', so I don't think the current implementation matches its name.


https://reviews.llvm.org/D27408





More information about the cfe-commits mailing list