@@ -346,7 +346,7 @@ class CFNumberCreateChecker : public Checker< check::PreStmt<CallExpr> > {
346
346
mutable std::unique_ptr<APIMisuse> BT;
347
347
mutable IdentifierInfo* II;
348
348
public:
349
- CFNumberCreateChecker () : II(0 ) {}
349
+ CFNumberCreateChecker () : II(nullptr ) {}
350
350
351
351
void checkPreStmt (const CallExpr *CE, CheckerContext &C) const ;
352
352
@@ -531,7 +531,8 @@ class CFRetainReleaseChecker : public Checker< check::PreStmt<CallExpr> > {
531
531
mutable std::unique_ptr<APIMisuse> BT;
532
532
mutable IdentifierInfo *Retain, *Release, *MakeCollectable;
533
533
public:
534
- CFRetainReleaseChecker (): Retain(0 ), Release(0 ), MakeCollectable(0 ) {}
534
+ CFRetainReleaseChecker ()
535
+ : Retain(nullptr ), Release(nullptr ), MakeCollectable(nullptr ) {}
535
536
void checkPreStmt (const CallExpr *CE, CheckerContext &C) const ;
536
537
};
537
538
} // end anonymous namespace
@@ -840,7 +841,7 @@ class ObjCLoopChecker
840
841
CheckerContext &C) const ;
841
842
842
843
public:
843
- ObjCLoopChecker () : CountSelectorII(0 ) {}
844
+ ObjCLoopChecker () : CountSelectorII(nullptr ) {}
844
845
void checkPostStmt (const ObjCForCollectionStmt *FCS, CheckerContext &C) const ;
845
846
void checkPostObjCMessage (const ObjCMethodCall &M, CheckerContext &C) const ;
846
847
void checkDeadSymbols (SymbolReaper &SymReaper, CheckerContext &C) const ;
@@ -880,7 +881,7 @@ static ProgramStateRef checkCollectionNonNil(CheckerContext &C,
880
881
ProgramStateRef State,
881
882
const ObjCForCollectionStmt *FCS) {
882
883
if (!State)
883
- return NULL ;
884
+ return nullptr ;
884
885
885
886
SVal CollectionVal = C.getSVal (FCS->getCollection ());
886
887
Optional<DefinedSVal> KnownCollection = CollectionVal.getAs <DefinedSVal>();
@@ -891,7 +892,7 @@ static ProgramStateRef checkCollectionNonNil(CheckerContext &C,
891
892
std::tie (StNonNil, StNil) = State->assume (*KnownCollection);
892
893
if (StNil && !StNonNil) {
893
894
// The collection is nil. This path is infeasible.
894
- return NULL ;
895
+ return nullptr ;
895
896
}
896
897
897
898
return StNonNil;
@@ -905,7 +906,7 @@ static ProgramStateRef checkElementNonNil(CheckerContext &C,
905
906
ProgramStateRef State,
906
907
const ObjCForCollectionStmt *FCS) {
907
908
if (!State)
908
- return NULL ;
909
+ return nullptr ;
909
910
910
911
// See if the collection is one where we /know/ the elements are non-nil.
911
912
if (!isKnownNonNilCollectionType (FCS->getCollection ()->getType ()))
@@ -918,7 +919,7 @@ static ProgramStateRef checkElementNonNil(CheckerContext &C,
918
919
Optional<Loc> ElementLoc;
919
920
if (const DeclStmt *DS = dyn_cast<DeclStmt>(Element)) {
920
921
const VarDecl *ElemDecl = cast<VarDecl>(DS->getSingleDecl ());
921
- assert (ElemDecl->getInit () == 0 );
922
+ assert (ElemDecl->getInit () == nullptr );
922
923
ElementLoc = State->getLValue (ElemDecl, LCtx);
923
924
} else {
924
925
ElementLoc = State->getSVal (Element, LCtx).getAs <Loc>();
@@ -945,7 +946,7 @@ assumeCollectionNonEmpty(CheckerContext &C, ProgramStateRef State,
945
946
const bool *KnownNonEmpty = State->get <ContainerNonEmptyMap>(CollectionS);
946
947
if (!KnownNonEmpty)
947
948
return State->set <ContainerNonEmptyMap>(CollectionS, Assumption);
948
- return (Assumption == *KnownNonEmpty) ? State : NULL ;
949
+ return (Assumption == *KnownNonEmpty) ? State : nullptr ;
949
950
}
950
951
951
952
SValBuilder &SvalBuilder = C.getSValBuilder ();
@@ -970,7 +971,7 @@ assumeCollectionNonEmpty(CheckerContext &C, ProgramStateRef State,
970
971
const ObjCForCollectionStmt *FCS,
971
972
bool Assumption) {
972
973
if (!State)
973
- return NULL ;
974
+ return nullptr ;
974
975
975
976
SymbolRef CollectionS =
976
977
State->getSVal (FCS->getCollection (), C.getLocationContext ()).getAsSymbol ();
@@ -1085,11 +1086,11 @@ void ObjCLoopChecker::checkPostObjCMessage(const ObjCMethodCall &M,
1085
1086
static SymbolRef getMethodReceiverIfKnownImmutable (const CallEvent *Call) {
1086
1087
const ObjCMethodCall *Message = dyn_cast_or_null<ObjCMethodCall>(Call);
1087
1088
if (!Message)
1088
- return 0 ;
1089
+ return nullptr ;
1089
1090
1090
1091
const ObjCMethodDecl *MD = Message->getDecl ();
1091
1092
if (!MD)
1092
- return 0 ;
1093
+ return nullptr ;
1093
1094
1094
1095
const ObjCInterfaceDecl *StaticClass;
1095
1096
if (isa<ObjCProtocolDecl>(MD->getDeclContext ())) {
@@ -1102,11 +1103,11 @@ static SymbolRef getMethodReceiverIfKnownImmutable(const CallEvent *Call) {
1102
1103
}
1103
1104
1104
1105
if (!StaticClass)
1105
- return 0 ;
1106
+ return nullptr ;
1106
1107
1107
1108
switch (findKnownClass (StaticClass, /* IncludeSuper=*/ false )) {
1108
1109
case FC_None:
1109
- return 0 ;
1110
+ return nullptr ;
1110
1111
case FC_NSArray:
1111
1112
case FC_NSDictionary:
1112
1113
case FC_NSEnumerator:
0 commit comments