Index: lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp =================================================================== --- lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp +++ lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp @@ -1931,7 +1931,7 @@ static Optional describeRegion(const MemRegion *MR) { if (const auto *VR = dyn_cast_or_null(MR)) - return std::string(cast(MR)->getDecl()->getName()); + return std::string(VR->getDecl()->getName()); // Once we support more storage locations for bindings, // this would need to be improved. return None;