diff options
author | Haojian Wu <hokein@google.com> | 2019-08-14 08:20:42 +0000 |
---|---|---|
committer | Haojian Wu <hokein@google.com> | 2019-08-14 08:20:42 +0000 |
commit | ec25edc17a45f838c2e76431f5c345d9c6e6bf89 (patch) | |
tree | 771c70dbf1d0641b22411ce55c733d7e5ff933ee /clang/lib/StaticAnalyzer/Core | |
parent | 2faafc6e4f20f62e83770a1eaae22fbf4b8603c7 (diff) | |
download | bcm5719-llvm-ec25edc17a45f838c2e76431f5c345d9c6e6bf89.tar.gz bcm5719-llvm-ec25edc17a45f838c2e76431f5c345d9c6e6bf89.zip |
Fix the -Wunused-variable warning.
llvm-svn: 368808
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/BugReporter.cpp | 2 | ||||
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
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::ranges_iterator> 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<Expr>(getStmt())) + if (dyn_cast_or_null<Expr>(getStmt())) return llvm::make_range(&ErrorNodeRange, &ErrorNodeRange + 1); return llvm::make_range(ranges_iterator(), ranges_iterator()); } diff --git a/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp b/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp index 21e488ff853..f0c8de26bc1 100644 --- a/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp +++ b/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp @@ -1987,7 +1987,7 @@ bool bugreporter::trackExpressionValue(const ExplodedNode *InputNode, if (const auto *SR = L->getRegionAs<SymbolicRegion>()) { if (SR->getSymbol()->getType()->getPointeeType()->isVoidType()) CanDereference = false; - } else if (const auto *AR = L->getRegionAs<AllocaRegion>()) + } else if (L->getRegionAs<AllocaRegion>()) CanDereference = false; // At this point we are dealing with the region's LValue. |