[PATCH] D12123: [analyzer] Skip Pre/Post handlers for ObjC calls when receiver is nil.
Gábor Horváth via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 18 16:40:51 PDT 2015
xazax.hun added a comment.
Looks good to me. There are some minor nits inline.
================
Comment at: include/clang/StaticAnalyzer/Core/CheckerManager.h:96
@@ -95,1 +95,3 @@
+enum class ObjCCheckerKind {
+ PreVisit,
----------------
I do not really like the name ObjCCheckerKind, because it is not kind of an Obj-C related checker. It is the kind of the visit of the message expression. Maybe ObjCMessageVisitKind? Or just MessageVisitKind to be a bit shorter?
================
Comment at: lib/StaticAnalyzer/Core/ExprEngineObjC.cpp:153
@@ +152,3 @@
+ ProgramStateRef notNilState, nilState;
+ std::tie(notNilState, nilState) = State->assume(receiverVal);
+ if (nilState && !notNilState) {
----------------
The old code had a comment about merging two cases and a reference to a rdar. Is that rdar already fixed? Maybe it would be good to preserve the at least the first part of the commend?
http://reviews.llvm.org/D12123
More information about the cfe-commits
mailing list