From ec25edc17a45f838c2e76431f5c345d9c6e6bf89 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Wed, 14 Aug 2019 08:20:42 +0000 Subject: Fix the -Wunused-variable warning. llvm-svn: 368808 --- clang/lib/StaticAnalyzer/Core/BugReporter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/StaticAnalyzer/Core/BugReporter.cpp') diff --git a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp index f2983b7f4b6..faf9481da3b 100644 --- a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp +++ b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp @@ -2180,7 +2180,7 @@ llvm::iterator_range BugReport::getRanges() const { // If no custom ranges, add the range of the statement corresponding to // the error node. if (Ranges.empty()) { - if (const auto *E = dyn_cast_or_null(getStmt())) + if (dyn_cast_or_null(getStmt())) return llvm::make_range(&ErrorNodeRange, &ErrorNodeRange + 1); return llvm::make_range(ranges_iterator(), ranges_iterator()); } -- cgit v1.2.3