Don't return bare symbols when asked to search
inside a namespace. This bypasses local variables.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152144 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Expression/ClangExpressionDeclMap.cpp b/source/Expression/ClangExpressionDeclMap.cpp
index be783e5..6b82c7d 100644
--- a/source/Expression/ClangExpressionDeclMap.cpp
+++ b/source/Expression/ClangExpressionDeclMap.cpp
@@ -2657,7 +2657,7 @@
append,
sc_list);
}
- else
+ else if (!namespace_decl)
{
const bool include_symbols = true;
@@ -2714,7 +2714,7 @@
}
}
- if (!context.m_found.variable)
+ if (!context.m_found.variable && !namespace_decl)
{
// We couldn't find a non-symbol variable for this. Now we'll hunt for a generic
// data symbol, and -- if it is found -- treat it as a variable.