Getting rid of
error: unused variable 'VR' [-Werror,-Wunused-variable]
warning/error at
lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp:1933
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@327802
91177308-0d34-0410-b5e6-
96231b3b80d8
static Optional<std::string> describeRegion(const MemRegion *MR) {
if (const auto *VR = dyn_cast_or_null<VarRegion>(MR))
- return std::string(cast<VarRegion>(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;