forked from qt-creator/qt-creator
Debugger[CDB]: Fix handling of shadowed variables.
Fix name formatting and algorithm to find uninitialized variables to use reverse order in case locals of the same name occur in a scope. Reviewed-by: hjk Task-number: QTCREATORBUG-4475
This commit is contained in:
@@ -338,8 +338,9 @@ static void blockRecursion(const CPlusPlus::Overview &overview,
|
||||
SeenHash *seenHash,
|
||||
int level = 0)
|
||||
{
|
||||
const int size = scope->memberCount();
|
||||
for (int s = 0; s < size; s++){
|
||||
// Go backwards in case someone has identical variables in the same scope.
|
||||
// Fixme: loop variables or similar are currently seen in the outer scope
|
||||
for (int s = scope->memberCount() - 1; s >= 0; --s){
|
||||
const CPlusPlus::Symbol *symbol = scope->memberAt(s);
|
||||
if (symbol->isDeclaration()) {
|
||||
// Find out about shadowed symbols by bookkeeping
|
||||
|
||||
Reference in New Issue
Block a user