zaks.anna accepted this revision.
zaks.anna added a comment.
This revision is now accepted and ready to land.

Please, commit after the comments are addressed!

Thank you,
Anna.


================
Comment at: lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp:39
@@ -26,1 +38,3 @@
 
+// ProgramState trait - a map from symbol to its specialized type.
+REGISTER_MAP_WITH_PROGRAMSTATE(TypeParamMap, SymbolRef,
----------------
I think this needs more explanation. We already have another map from a symbol 
to it's type. What is different about this one?

Maybe add something along these lines:
The type inflation is tracked by DynamicTypeMap.This is an auxiliary map that 
tracks more information in some cases where the known specialized type is an 
ancestor of the most precise type. 

Maybe the name of the map could be enhanced as well? Now you have TypeParamMap 
and DynamicTypeMap..

================
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);
----------------
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.)

================
Comment at: lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp:275
@@ +274,3 @@
+///
+/// Precondition: the cast is between ObjCObjectPointers.
+ExplodedNode *DynamicTypePropagation::dynamicTypePropagationOnCasts(
----------------
I do not see where you are checking the precondition.


http://reviews.llvm.org/D12381



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to