diff options
author | Jordan Rose <jordan_rose@apple.com> | 2013-11-08 17:23:33 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2013-11-08 17:23:33 +0000 |
commit | 5650bcb18e117c4063d64a5378f75b564790c36e (patch) | |
tree | 925e151a55a1499bb557f6e1a364c5f229aa398f /clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp | |
parent | 93bcc66e732b8c8589be3bd079ce1c12c90afb9e (diff) | |
download | bcm5719-llvm-5650bcb18e117c4063d64a5378f75b564790c36e.tar.gz bcm5719-llvm-5650bcb18e117c4063d64a5378f75b564790c36e.zip |
Revert 'Tweak ContainerNonEmptyMap with "int" instead of "bool"'.
I've added the missing ImutProfileInfo [sic] specialization for bool,
so this patch on r194235 is no longer needed.
This reverts r194244 / 2baea2887dfcf023c8e3560e5d4713c42eed7b6b.
llvm-svn: 194265
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 83851eb9ae6..f66f8b75ed3 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, int) +REGISTER_MAP_WITH_PROGRAMSTATE(ContainerNonEmptyMap, SymbolRef, bool) namespace { class ObjCLoopChecker @@ -906,7 +906,7 @@ assumeCollectionNonEmpty(CheckerContext &C, ProgramStateRef State, const SymbolRef *CountS = State->get<ContainerCountMap>(CollectionS); if (!CountS) { - const int *KnownNonEmpty = State->get<ContainerNonEmptyMap>(CollectionS); + const bool *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 int *NonEmpty = State->get<ContainerNonEmptyMap>(ContainerS)) { + if (const bool *NonEmpty = State->get<ContainerNonEmptyMap>(ContainerS)) { State = State->remove<ContainerNonEmptyMap>(ContainerS); State = assumeCollectionNonEmpty(C, State, ContainerS, *NonEmpty); } |