diff options
-rw-r--r-- | lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.h | 1 | ||||
-rw-r--r-- | lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.h b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.h index bb6384721f5..653675eb99d 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.h +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.h @@ -430,6 +430,7 @@ struct NameSearchContext { bool variable : 1; bool function_with_type_info : 1; bool function : 1; + bool local_vars_nsp : 1; } m_found; //------------------------------------------------------------------ diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp index 556b27348e5..4b398631fd4 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp @@ -866,7 +866,7 @@ ClangExpressionDeclMap::FindExternalVisibleDecls (NameSearchContext &context) current_id); } - if (!context.m_found.variable) + if (!context.m_found.variable && !context.m_found.local_vars_nsp) ClangASTSource::FindExternalVisibleDecls(context); } @@ -1199,6 +1199,7 @@ ClangExpressionDeclMap::FindExternalVisibleDecls (NameSearchContext &context, context.AddNamedDecl(namespace_decl); clang::DeclContext *clang_decl_ctx = clang::Decl::castToDeclContext(namespace_decl); clang_decl_ctx->setHasExternalVisibleStorage(true); + context.m_found.local_vars_nsp = true; } } } |