summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/type_lookup/TestCppTypeLookup.py5
-rw-r--r--lldb/source/Core/Module.cpp5
2 files changed, 8 insertions, 2 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/type_lookup/TestCppTypeLookup.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/type_lookup/TestCppTypeLookup.py
index 8fb003bb650..94d52e368e8 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/type_lookup/TestCppTypeLookup.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/type_lookup/TestCppTypeLookup.py
@@ -38,6 +38,11 @@ class TestCppTypeLookup(TestBase):
# Get frame for current thread
frame = thread.GetSelectedFrame()
+ # We are testing LLDB's type lookup machinery, but if we inject local
+ # variables, the types for those will be found because they have been
+ # imported through the variable, not because the type lookup worked.
+ self.runCmd("settings set target.experimental.inject-local-vars false")
+
# Make sure we don't accidentally accept structures that exist only
# in namespaces when evaluating expressions with top level types.
# Prior to the revision that added this test, we would accidentally
diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp
index db198d3a9a0..88e5b582d3d 100644
--- a/lldb/source/Core/Module.cpp
+++ b/lldb/source/Core/Module.cpp
@@ -997,6 +997,7 @@ size_t Module::FindTypes(
const bool append = true;
TypeClass type_class = eTypeClassAny;
TypeMap typesmap;
+
if (Type::GetTypeScopeAndBasename(type_name_cstr, type_scope, type_basename,
type_class)) {
// Check if "name" starts with "::" which means the qualified type starts
@@ -1019,12 +1020,12 @@ size_t Module::FindTypes(
// The "type_name_cstr" will have been modified if we have a valid type
// class prefix (like "struct", "class", "union", "typedef" etc).
FindTypes_Impl(sc, ConstString(type_basename), nullptr, append,
- max_matches, searched_symbol_files, typesmap);
+ UINT_MAX, searched_symbol_files, typesmap);
typesmap.RemoveMismatchedTypes(type_scope, type_basename, type_class,
exact_match);
num_matches = typesmap.GetSize();
} else {
- num_matches = FindTypes_Impl(sc, name, nullptr, append, max_matches,
+ num_matches = FindTypes_Impl(sc, name, nullptr, append, UINT_MAX,
searched_symbol_files, typesmap);
if (exact_match) {
std::string name_str(name.AsCString(""));
OpenPOWER on IntegriCloud