Index: lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp =================================================================== --- lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp +++ lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp @@ -960,8 +960,9 @@ } if (Optional indexV = index.getAs()) { - return loc::MemRegionVal(MemMgr.getElementRegion(elementType, *indexV, - superR, getContext())); + if (!elementType.isNull()) + return loc::MemRegionVal(MemMgr.getElementRegion(elementType, *indexV, + superR, getContext())); } } return UnknownVal();