diff options
| author | Raphael Isemann <teemperor@gmail.com> | 2019-11-21 13:43:48 +0100 |
|---|---|---|
| committer | Raphael Isemann <teemperor@gmail.com> | 2019-11-21 13:43:48 +0100 |
| commit | 24e98867937d5bb89605fd7be7e9ebdd3d5fb935 (patch) | |
| tree | 37007be9be1ea0f607c3cb4ba78e3bb9efd17434 | |
| parent | 161742a612d198a8a89a1be5b2a893ceec8d852d (diff) | |
| download | bcm5719-llvm-24e98867937d5bb89605fd7be7e9ebdd3d5fb935.tar.gz bcm5719-llvm-24e98867937d5bb89605fd7be7e9ebdd3d5fb935.zip | |
[lldb][NFC] Reduce scope of some variables in ClangExpressionDeclMap::FindExternalVisibleDecls
| -rw-r--r-- | lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp index 50e76be8f31..0fdc5e266a0 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp @@ -1223,8 +1223,6 @@ void ClangExpressionDeclMap::FindExternalVisibleDecls( Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); - SymbolContextList sc_list; - const ConstString name(context.m_decl_name.getAsString().c_str()); if (IgnoreName(name, false)) return; @@ -1288,8 +1286,6 @@ void ClangExpressionDeclMap::FindExternalVisibleDecls( } return; } - ValueObjectSP valobj; - VariableSP var; bool local_var_lookup = !namespace_decl || (namespace_decl.GetName() == @@ -1299,6 +1295,8 @@ void ClangExpressionDeclMap::FindExternalVisibleDecls( return; if (target) { + ValueObjectSP valobj; + VariableSP var; var = FindGlobalVariable(*target, module_sp, name, &namespace_decl, nullptr); @@ -1320,7 +1318,7 @@ void ClangExpressionDeclMap::FindExternalVisibleDecls( } const bool include_inlines = false; - sc_list.Clear(); + SymbolContextList sc_list; if (namespace_decl && module_sp) { const bool include_symbols = false; |

