[clang] 1f8ae9d - Inline function calls.
via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 26 21:14:55 PDT 2022
Author: Weverything
Date: 2022-07-26T21:12:28-07:00
New Revision: 1f8ae9d7e7e4afcc4e76728b28e64941660ca3eb
URL: https://github.com/llvm/llvm-project/commit/1f8ae9d7e7e4afcc4e76728b28e64941660ca3eb
DIFF: https://github.com/llvm/llvm-project/commit/1f8ae9d7e7e4afcc4e76728b28e64941660ca3eb.diff
LOG: Inline function calls.
Fix unused variable in non-assert builds after
300fbf56f89aebbe2ef9ed490066bab23e5356d1
Added:
Modified:
clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
Removed:
################################################################################
diff --git a/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp b/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
index 79962477025bb..f6f71e34b8927 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;
More information about the cfe-commits
mailing list