From: Bjorn Pettersson Date: Sun, 18 Mar 2018 16:07:20 +0000 (+0000) Subject: Resolve unused variable 'VR' warning in RetainCountChecker.cpp X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=88f530219f0f279cf79664b4e8139982ea7a070b;p=clang Resolve unused variable 'VR' warning in RetainCountChecker.cpp 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 --- diff --git a/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp b/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp index a891797947..98d5fcfb9c 100644 --- a/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp @@ -1931,7 +1931,7 @@ static bool isNumericLiteralExpression(const Expr *E) { 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;