Skip to content

Commit bc6ae49

Browse files
committed
Merge pull request #730 from Dmitry-Me/loopVariableNotUsed
Loop variable wasn't really used
2 parents 315d502 + 6f99614 commit bc6ae49

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

lib/symboldatabase.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2590,10 +2590,10 @@ void Function::addArguments(const SymbolDatabase *symbolDatabase, const Scope *s
25902590
argType = symbolDatabase->findVariableType(scope, typeTok);
25912591
if (!argType) {
25922592
// look for variable type in any using namespace in this scope or above
2593-
const Scope *parent = scope;
2594-
while (parent) {
2595-
for (std::list<Scope::UsingInfo>::const_iterator ui = scope->usingList.begin();
2596-
ui != scope->usingList.end(); ++ui) {
2593+
const Scope *currentScope = scope;
2594+
while (currentScope) {
2595+
for (std::list<Scope::UsingInfo>::const_iterator ui = currentScope->usingList.begin();
2596+
ui != currentScope->usingList.end(); ++ui) {
25972597
if (ui->scope) {
25982598
argType = symbolDatabase->findVariableType(ui->scope, typeTok);
25992599
if (argType)
@@ -2602,7 +2602,7 @@ void Function::addArguments(const SymbolDatabase *symbolDatabase, const Scope *s
26022602
}
26032603
if (argType)
26042604
break;
2605-
parent = parent->nestedIn;
2605+
currentScope = currentScope->nestedIn;
26062606
}
26072607
}
26082608
}

0 commit comments

Comments
 (0)