[lldb][NFC] Reduce scope of some variables in ClangExpressionDeclMap::FindExternalVisibleDecls

This commit is contained in:
Raphael Isemann 2019-11-21 13:43:48 +01:00
parent 161742a612
commit 24e9886793
1 changed files with 3 additions and 5 deletions

View File

@ -1223,8 +1223,6 @@ void ClangExpressionDeclMap::FindExternalVisibleDecls(
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
SymbolContextList sc_list;
const ConstString name(context.m_decl_name.getAsString().c_str()); const ConstString name(context.m_decl_name.getAsString().c_str());
if (IgnoreName(name, false)) if (IgnoreName(name, false))
return; return;
@ -1288,8 +1286,6 @@ void ClangExpressionDeclMap::FindExternalVisibleDecls(
} }
return; return;
} }
ValueObjectSP valobj;
VariableSP var;
bool local_var_lookup = bool local_var_lookup =
!namespace_decl || (namespace_decl.GetName() == !namespace_decl || (namespace_decl.GetName() ==
@ -1299,6 +1295,8 @@ void ClangExpressionDeclMap::FindExternalVisibleDecls(
return; return;
if (target) { if (target) {
ValueObjectSP valobj;
VariableSP var;
var = FindGlobalVariable(*target, module_sp, name, &namespace_decl, var = FindGlobalVariable(*target, module_sp, name, &namespace_decl,
nullptr); nullptr);
@ -1320,7 +1318,7 @@ void ClangExpressionDeclMap::FindExternalVisibleDecls(
} }
const bool include_inlines = false; const bool include_inlines = false;
sc_list.Clear(); SymbolContextList sc_list;
if (namespace_decl && module_sp) { if (namespace_decl && module_sp) {
const bool include_symbols = false; const bool include_symbols = false;