teak-llvm/lldb/packages/Python/lldbsuite/test/lang/cpp
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
..
auto Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
bool Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
breakpoint-commands Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
call-function Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
chained-calls Compile the LLDB tests out-of-tree. 2018-01-30 18:29:16 +00:00
char1632_t Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
class_static Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
class_types Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
class-template-parameter-pack xfail TestClassTemplateParameterPack on gcc to mollify lldb-x86_64-ubuntu-14.04-cmake. 2017-05-11 23:38:21 +00:00
const_this *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
diamond Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
dynamic-value [test] Replace some references to Apple-internal bugs 2018-03-13 23:37:11 +00:00
dynamic-value-same-basename Make TestDynamicValueSameBase gcc-compatible 2018-03-01 16:56:28 +00:00
enum_types Mark test_*int*_t_dwarf as failing on FreeBSD 2018-02-27 02:54:17 +00:00
exceptions Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
extern_c Fixup the xfail situation on Windows. 2016-10-05 20:47:17 +00:00
frame-var-anon-unions Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
function-template-parameter-pack Skip TestFunctionTemplateParameterPack.py, which unexpectedly asserts (PR35920) 2018-01-12 01:23:52 +00:00
global_operators Compile the LLDB tests out-of-tree. 2018-01-30 18:29:16 +00:00
gmodules [DWARFASTParserClang] Complete external record types before using them as a decl context. 2018-03-16 22:12:22 +00:00
gmodules-templates Fix linux fallout from c++ gmodules enable 2018-01-26 11:40:59 +00:00
incomplete-types Modernize a test. 2018-03-19 23:15:06 +00:00
inlines Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
lambdas Work around test failures on red-hat linux 2017-12-21 14:40:03 +00:00
limit-debug-info Compile the LLDB tests out-of-tree. 2018-01-30 18:29:16 +00:00
llvm-style Name the C++ source files for two tests correctly. 2017-04-24 23:58:36 +00:00
member-and-local-vars-with-same-name Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
namespace Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
namespace_conflicts Added a testcase for local/namespaced name conflicts. 2017-05-31 17:18:10 +00:00
namespace_definitions Only throw -fPIC when building a shared library 2018-02-08 23:10:29 +00:00
nsimport Compile the LLDB tests out-of-tree. 2018-01-30 18:29:16 +00:00
operator-overload Fix TestOperatorOverload for 32-bit builds 2018-03-21 09:43:50 +00:00
overloaded-functions Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
printf [test] Replace some references to Apple-internal bugs 2018-03-13 23:37:11 +00:00
rvalue-references Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
scope Compile the LLDB tests out-of-tree. 2018-01-30 18:29:16 +00:00
signed_types Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
static_members Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
static_methods Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
stl [test] Replace some references to Apple-internal bugs 2018-03-13 23:37:11 +00:00
symbols Name the C++ source files for two tests correctly. 2017-04-24 23:58:36 +00:00
template Support template template parameters 2018-04-02 16:18:32 +00:00
this Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
trivial_abi Revert r328715. Wasn't wrong, just not the issue. 2018-03-28 18:05:43 +00:00
type_lookup Really test type lookup in TestCppTypeLookup.py 2018-05-08 03:08:46 +00:00
unicode-literals Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
unique-types [test] Replace some references to Apple-internal bugs 2018-03-13 23:37:11 +00:00
unsigned_types Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
virtual Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
virtual-overload Fix a crash when resolving overloads of C++ virtual methods. 2018-04-20 17:14:05 +00:00
wchar_t Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00