diff --git a/clang/lib/StaticAnalyzer/Core/MemRegion.cpp b/clang/lib/StaticAnalyzer/Core/MemRegion.cpp index bb45a879471ae..d7409ae6aebe8 100644 --- a/clang/lib/StaticAnalyzer/Core/MemRegion.cpp +++ b/clang/lib/StaticAnalyzer/Core/MemRegion.cpp @@ -1279,7 +1279,7 @@ const MemSpaceRegion *MemRegion::getMemorySpace() const { SR = dyn_cast(R); } - return dyn_cast(R); + return cast(R); } bool MemRegion::hasStackStorage() const {