r327802 - Resolve unused variable 'VR' warning in RetainCountChecker.cpp
Bjorn Pettersson via cfe-commits
cfe-commits at lists.llvm.org
Sun Mar 18 09:07:20 PDT 2018
Author: bjope
Date: Sun Mar 18 09:07:20 2018
New Revision: 327802
URL: http://llvm.org/viewvc/llvm-project?rev=327802&view=rev
Log:
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
Modified:
cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp?rev=327802&r1=327801&r2=327802&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp Sun Mar 18 09:07:20 2018
@@ -1931,7 +1931,7 @@ static bool isNumericLiteralExpression(c
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;
More information about the cfe-commits
mailing list