diff options
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp b/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp index f66f8b75ed3..83851eb9ae6 100644 --- a/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp @@ -790,7 +790,7 @@ void VariadicMethodTypeChecker::checkPreObjCMessage(const ObjCMethodCall &msg, // The map from container symbol to the container count symbol. // We currently will remember the last countainer count symbol encountered. REGISTER_MAP_WITH_PROGRAMSTATE(ContainerCountMap, SymbolRef, SymbolRef) -REGISTER_MAP_WITH_PROGRAMSTATE(ContainerNonEmptyMap, SymbolRef, bool) +REGISTER_MAP_WITH_PROGRAMSTATE(ContainerNonEmptyMap, SymbolRef, int) namespace { class ObjCLoopChecker @@ -906,7 +906,7 @@ assumeCollectionNonEmpty(CheckerContext &C, ProgramStateRef State, const SymbolRef *CountS = State->get<ContainerCountMap>(CollectionS); if (!CountS) { - const bool *KnownNonEmpty = State->get<ContainerNonEmptyMap>(CollectionS); + const int *KnownNonEmpty = State->get<ContainerNonEmptyMap>(CollectionS); if (!KnownNonEmpty) return State->set<ContainerNonEmptyMap>(CollectionS, Assumption); return (Assumption == *KnownNonEmpty) ? State : NULL; @@ -1036,7 +1036,7 @@ void ObjCLoopChecker::checkPostObjCMessage(const ObjCMethodCall &M, C.getSymbolManager().addSymbolDependency(ContainerS, CountS); State = State->set<ContainerCountMap>(ContainerS, CountS); - if (const bool *NonEmpty = State->get<ContainerNonEmptyMap>(ContainerS)) { + if (const int *NonEmpty = State->get<ContainerNonEmptyMap>(ContainerS)) { State = State->remove<ContainerNonEmptyMap>(ContainerS); State = assumeCollectionNonEmpty(C, State, ContainerS, *NonEmpty); } |