llvm-project/lldb
Frederic Riss 1739b7d076 Really test type lookup in TestCppTypeLookup.py
Summary:
... and fix one bug found this way. Currently, the test works not because
types are looked up correctly, but because by injecting local variables
we also materialize the types for Clang. If we disable the local variable
injection, then one check fails.

The reason of the failure is that FindTypes is run with max_matches==1
and this value is passed down to the symbol lookup functions. When the
search is performed only on the basename (like it's the case for an
entity defined in the root namespace), then the search will stop after
having found one match on the basename. But that match might be in a
namespace, we were really just looking up the basename in the accelerator
tables.

The solution is to not pass max_matches down, but to search without a
limit and let RemoveMismatchedTypes do its job afterwards. Note the
patch includes 2 hunks with the same change, but only the latter is
tested. I couldn't find a way to create a testcase for the other
branch of the if ('image lookup -t' allows me to get there, but it
only ever returns one type anyway).

Reviewers: clayborg, jingham

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D46548

llvm-svn: 331719
2018-05-08 03:08:46 +00:00
..
cmake [cmake] Fix standalone+LLVM_LINK_LLVM_DYLIB builds (pr36687) 2018-03-14 10:08:21 +00:00
docs Enable AUTOBRIEF in doxygen configuration. 2018-05-02 16:55:16 +00:00
examples Added a BSD archive tool. 2018-04-02 17:20:21 +00:00
include/lldb DWARFExpression: Convert file addresses to load addresses early on. 2018-05-03 23:32:47 +00:00
lit [CMake] Unify and relayer testing 2018-05-03 16:54:10 +00:00
lldb.xcodeproj Fix the Xcode gtest target for the move of FileSpecTest.cpp. 2018-04-20 18:30:31 +00:00
lldb.xcworkspace Fix a typo in the gtest build target for Debug configuration. 2018-04-10 17:49:56 +00:00
packages/Python/lldbsuite Really test type lookup in TestCppTypeLookup.py 2018-05-08 03:08:46 +00:00
resources
scripts Add children and child[N] properties to SBValue.i. 2018-05-04 01:31:47 +00:00
source Really test type lookup in TestCppTypeLookup.py 2018-05-08 03:08:46 +00:00
test [CMake] Unify and relayer testing 2018-05-03 16:54:10 +00:00
third_party/Python/module *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
tools [CMake] Unify and relayer testing 2018-05-03 16:54:10 +00:00
unittests Fix gdb-remote qMemoryRegionInfo unit tests for xml-enabled builds 2018-05-02 17:00:33 +00:00
utils [CMake] Unify and relayer testing 2018-05-03 16:54:10 +00:00
www [docs] Add LLDB_TEST_USE_CUSTOM_C_COMPILER and LLDB_TEST_USE_CUSTOM_CXX_COMPILER to the build and test hmtl pages 2018-04-12 23:29:49 +00:00
.arcconfig Upgrade all the .arcconfigs to https. 2016-07-14 13:15:37 +00:00
.clang-format Updated .clang-format rules so bring LLDB in line with LLVM standards. 2016-09-06 17:19:00 +00:00
.gitignore [dotest] Remove crashinfo hook 2018-01-10 10:18:47 +00:00
CMakeLists.txt [CMake] Unify and relayer testing 2018-05-03 16:54:10 +00:00
CODE_OWNERS.txt Remove Sean Callanan from the CODE_OWNERS, he won't have time 2017-11-01 01:38:42 +00:00
INSTALL.txt Changed builld-llvm.py to use .json files 2017-02-23 02:21:34 +00:00
LICENSE.TXT
use_lldb_suite_root.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00