Skip to content

Commit 1f8ae9d

Browse files
committed
Inline function calls.
Fix unused variable in non-assert builds after 300fbf5
1 parent e385779 commit 1f8ae9d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -213,20 +213,18 @@ Environment Environment::pushCall(const CallExpr *Call) const {
213213

214214
const auto *FuncDecl = Call->getDirectCallee();
215215
assert(FuncDecl != nullptr);
216-
const auto *Body = FuncDecl->getBody();
217-
assert(Body != nullptr);
216+
assert(FuncDecl->getBody() != nullptr);
218217
// FIXME: In order to allow the callee to reference globals, we probably need
219218
// to call `initGlobalVars` here in some way.
220219

221220
auto ParamIt = FuncDecl->param_begin();
222-
auto ParamEnd = FuncDecl->param_end();
223221
auto ArgIt = Call->arg_begin();
224222
auto ArgEnd = Call->arg_end();
225223

226224
// FIXME: Parameters don't always map to arguments 1:1; examples include
227225
// overloaded operators implemented as member functions, and parameter packs.
228226
for (; ArgIt != ArgEnd; ++ParamIt, ++ArgIt) {
229-
assert(ParamIt != ParamEnd);
227+
assert(ParamIt != FuncDecl->param_end());
230228

231229
const VarDecl *Param = *ParamIt;
232230
const Expr *Arg = *ArgIt;

0 commit comments

Comments
 (0)