Minor: fix MSVC shadow warning (#3376)

This commit is contained in:
chrchr-github 2021-08-04 08:16:02 +02:00 committed by GitHub
parent 8869ee3554
commit 28c8b00e5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -1439,18 +1439,18 @@ bool isConstFunctionCall(const Token* ftok, const Library& library)
} else if (f->argumentList.empty()) {
return f->isConstexpr();
}
} else if (const Library::Function* f = library.getFunction(ftok)) {
if (f->ispure)
} else if (const Library::Function* lf = library.getFunction(ftok)) {
if (lf->ispure)
return true;
for (auto&& p : f->argumentChecks) {
for (auto&& p : lf->argumentChecks) {
const Library::ArgumentChecks& ac = p.second;
if (ac.direction != Library::ArgumentChecks::Direction::DIR_IN)
return false;
}
if (Token::simpleMatch(ftok->previous(), ".")) {
if (!f->isconst)
if (!lf->isconst)
return false;
} else if (f->argumentChecks.empty()) {
} else if (lf->argumentChecks.empty()) {
return false;
}
} else {