Index: lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp =================================================================== --- lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp +++ lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp @@ -693,6 +693,8 @@ !Param->getType()->isReferenceType()) continue; + assert(ArgExpr && "cannot get the type of a NULL expression"); + NullConstraint Nullness = getNullConstraint(*ArgSVal, State); Nullability RequiredNullability = Index: lib/StaticAnalyzer/Core/PlistDiagnostics.cpp =================================================================== --- lib/StaticAnalyzer/Core/PlistDiagnostics.cpp +++ lib/StaticAnalyzer/Core/PlistDiagnostics.cpp @@ -294,9 +294,8 @@ SmallVector Fids; const SourceManager* SM = nullptr; - if (!Diags.empty()) - SM = &Diags.front()->path.front()->getLocation().getManager(); - + assert(!Diags.empty() && "cannot iterate through empty PathDiagnostic"); + SM = &Diags.front()->path.front()->getLocation().getManager(); for (std::vector::iterator DI = Diags.begin(), DE = Diags.end(); DI != DE; ++DI) {