[all-commits] [llvm/llvm-project] 5bde2a: [lldb] Improve type name parsing (#91586)
Pavel Labath via All-commits
all-commits at lists.llvm.org
Thu May 9 23:35:04 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5bde2aa1080ba90021f8f5e0c48744ddfc0d6f15
https://github.com/llvm/llvm-project/commit/5bde2aa1080ba90021f8f5e0c48744ddfc0d6f15
Author: Pavel Labath <pavel at labath.sk>
Date: 2024-05-10 (Fri, 10 May 2024)
Changed paths:
M lldb/include/lldb/Symbol/Type.h
M lldb/include/lldb/Symbol/TypeList.h
M lldb/include/lldb/Symbol/TypeMap.h
M lldb/source/Symbol/Type.cpp
M lldb/source/Symbol/TypeList.cpp
M lldb/source/Symbol/TypeMap.cpp
A lldb/test/API/python_api/sbmodule/FindTypes/Makefile
A lldb/test/API/python_api/sbmodule/FindTypes/TestSBModuleFindTypes.py
A lldb/test/API/python_api/sbmodule/FindTypes/main.cpp
M lldb/unittests/Symbol/TestType.cpp
Log Message:
-----------
[lldb] Improve type name parsing (#91586)
Parsing of '::' scopes in TypeQuery was very naive and failed for names
with '::''s in template arguments. Interestingly, one of the functions
it was calling (Type::GetTypeScopeAndBasename) was already doing the
same thing, and getting it (mostly (*)) right. This refactors the
function so that it can return the scope results, fixing the parsing of
names like std::vector<int, std::allocator<int>>::iterator.
Two callers of GetTypeScopeAndBasename are deleted as the functions are
not used (I presume they stopped being used once we started pruning type
search results more eagerly).
(*) This implementation is still not correct when one takes c++
operators into account -- e.g., something like `X<&A::operator<>::T` is
a legitimate type name. We do have an implementation that is able to
handle names like these (CPlusPlusLanguage::MethodName), but using it is
not trivial, because it is hidden in a language plugin and specific to
method name parsing.
---------
Co-authored-by: Michael Buch <michaelbuch12 at gmail.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list