[PATCH] D12381: [Static Analyzer] Merge the Objective-C Generics Checker into Dynamic Type Propagation checker.

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 13 16:00:55 PDT 2015


xazax.hun marked 3 inline comments as done.

================
Comment at: lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp:121
@@ -54,3 +120,3 @@
        I != E; ++I) {
     if (!SR.isLiveRegion(I->first)) {
       State = State->remove<DynamicTypeMap>(I->first);
----------------
zaks.anna wrote:
> It's odd that we are using this API.. Are we keeping track of non-symbolic regions? If not, can't we just check if Region->getSymbol() is dead?
> (Same in the nullability checker.)
The DynamicTypeMap might contain non-symbolic regions. (The tests fails when I cast the regions stored in the map to symbolic regions.)

This observation is good however for the nullability checker. 

================
Comment at: lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp:275
@@ +274,3 @@
+///
+/// Precondition: the cast is between ObjCObjectPointers.
+ExplodedNode *DynamicTypePropagation::dynamicTypePropagationOnCasts(
----------------
zaks.anna wrote:
> I do not see where you are checking the precondition.
The check is in line 507. It is checked anyways for the generics checker and I did not want to add redundant checks to this function.


http://reviews.llvm.org/D12381





More information about the cfe-commits mailing list