r194265 - Revert 'Tweak ContainerNonEmptyMap with "int" instead of "bool"'.
Jordan Rose
jordan_rose at apple.com
Fri Nov 8 09:23:33 PST 2013
Author: jrose
Date: Fri Nov 8 11:23:33 2013
New Revision: 194265
URL: http://llvm.org/viewvc/llvm-project?rev=194265&view=rev
Log:
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.
Modified:
cfe/trunk/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp?rev=194265&r1=194264&r2=194265&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp Fri Nov 8 11:23:33 2013
@@ -790,7 +790,7 @@ void VariadicMethodTypeChecker::checkPre
// 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
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::checkPostObjCMessa
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);
}
More information about the cfe-commits
mailing list