From fe3578650c8eb0fdfa2f539ab84769496eb00c9e Mon Sep 17 00:00:00 2001 From: Bjorn Pettersson Date: Sun, 18 Mar 2018 16:07:20 +0000 Subject: [PATCH] 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 llvm-svn: 327802 --- clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp index a8917979473b..98d5fcfb9c1c 100644 --- a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp +++ b/clang/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;