[Lldb-commits] [PATCH] D46548: Really test type lookup in TestCppTypeLookup.py
Frederic Riss via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon May 7 20:14:59 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL331719: Really test type lookup in TestCppTypeLookup.py (authored by friss, committed by ).
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
https://reviews.llvm.org/D46548
Files:
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/type_lookup/TestCppTypeLookup.py
lldb/trunk/source/Core/Module.cpp
Index: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/type_lookup/TestCppTypeLookup.py
===================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/type_lookup/TestCppTypeLookup.py
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/type_lookup/TestCppTypeLookup.py
@@ -38,6 +38,11 @@
# 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
Index: lldb/trunk/source/Core/Module.cpp
===================================================================
--- lldb/trunk/source/Core/Module.cpp
+++ lldb/trunk/source/Core/Module.cpp
@@ -997,6 +997,7 @@
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 @@
// 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(""));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46548.145627.patch
Type: text/x-patch
Size: 2358 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180508/43bbdd9f/attachment.bin>
More information about the lldb-commits
mailing list