ayartsev added inline comments. ================ Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:523 @@ -510,2 +522,3 @@ REGISTER_MAP_WITH_PROGRAMSTATE(ReallocPairs, SymbolRef, ReallocPair) +REGISTER_MAP_WITH_PROGRAMSTATE(ReallocSizeZeroFlag, SymbolRef, ReallocSizeZero) ---------------- zaks.anna wrote: > I do not think this is related to my question. > > You add a map from a symbol to a "flag" here; not really a flag but the empty > struct ReallocSizeZero. The only ways this is used is to set in the state > that the symbol is zero realloced or query if the specific symbol is zero > realloced. It seems that using the set of zero realloced symbols would be the > right data structure here. > > Why do we need the extra complexity of the map and the empty struct? Got it! Updated the patch.
http://reviews.llvm.org/D9040 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits