aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWeverything <rtrieu@google.com>2022-07-26 21:02:31 -0700
committerWeverything <rtrieu@google.com>2022-07-26 21:12:28 -0700
commit1f8ae9d7e7e4afcc4e76728b28e64941660ca3eb (patch)
treebcc5303251d05e867241d3c0f27f6ad3fb979e61
parente3857791a7af9999c09060e8360e3c45fde8e984 (diff)
Inline function calls.
Fix unused variable in non-assert builds after 300fbf56f89aebbe2ef9ed490066bab23e5356d1
-rw-r--r--clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp b/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
index 79962477025b..f6f71e34b892 100644
--- a/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
+++ b/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
@@ -213,20 +213,18 @@ Environment Environment::pushCall(const CallExpr *Call) const {
const auto *FuncDecl = Call->getDirectCallee();
assert(FuncDecl != nullptr);
- const auto *Body = FuncDecl->getBody();
- assert(Body != nullptr);
+ assert(FuncDecl->getBody() != nullptr);
// FIXME: In order to allow the callee to reference globals, we probably need
// to call `initGlobalVars` here in some way.
auto ParamIt = FuncDecl->param_begin();
- auto ParamEnd = FuncDecl->param_end();
auto ArgIt = Call->arg_begin();
auto ArgEnd = Call->arg_end();
// FIXME: Parameters don't always map to arguments 1:1; examples include
// overloaded operators implemented as member functions, and parameter packs.
for (; ArgIt != ArgEnd; ++ParamIt, ++ArgIt) {
- assert(ParamIt != ParamEnd);
+ assert(ParamIt != FuncDecl->param_end());
const VarDecl *Param = *ParamIt;
const Expr *Arg = *ArgIt;