[clang-tidy] Fixes false positive with a non-const method on a pointer (#188844)
Fixes
#56777
#58098
#64955
Non-const member functions don't mutate the pointer but the pointee.
Pointee mutations follow different path within the analyzer, so should
not be effected.
Edit to old tests were needed. Adds a dedicated tests besides those.
[lldb][NativePDB] Use decl context from a method's class (#199221)
When we look up the parent decl context for a method, we used to look
for that by name. For "regular" types that works well.
Say, we have a `struct ns::Foo` and `ns::Foo::bar`. We'd search for
`ns::Foo` and use its context.
For special types - mainly lambdas - this doesn't work. They can't be
found by looking for the name we get from the function symbol. That name
won't be in the TPI hash table we use.
I'm not fully sure under which name they're in that table. For example,
if we get the name `Foo::fun::<lambda_1>::operator()` from the function
symbol, we'd look for `Foo::fun::<lambda_1>`. This fails. A class with
this name is actually present, but it has a different unique name. Its
unique name demangles to `` `public: void __cdecl
Foo::fun(void)'::`1'::<lambda_1> `` which doesn't match what we searched
for. That might be the issue.
[6 lines not shown]
[Instrumentor] Improve stub printer (for C/C++ and value packs)
The stub printer now emits a helper header to deal with value packs (in
C and C++). We also make the files C/C++ compatible and use the proper
format strings for int32_t and int64_t.
[scudo] Create a non-static getErrorInfo function. (#199770)
Create a getErrorInfo function that operates on the Allocator and
doesn't require passing in all of the extra information.
Add interface function __scudo_get_fault_error_info that calls this new
function.
Add all needed functions to support the new getErrorInfo.
This is being added to replace the static version from Android that
required linking in a copy of libscudo to use. This new version will be
used directly from libc.
[lldb][Darwin] Save "most recent SDK root" in local var (#200095)
In PlatformRemoteDarwinDevice::GetSharedModule we have an array of "sdk
root" directories (aka DeviceSupport directories) for a remote device,
which contain all of the system shared libraries on the local mac. We
may have 6 SDK Root directories for different OS builds. We try to
identify the correct one for the target based on version number, but
when we find a file with a matching UUID in one directory we set that as
the "most recently successful" directory, and start our searches with
that one. Then we fall back to searching all the other directories.
Since adding parallel module loading, because this method doesn't lock
access to the "most recently successful directory"
(m_last_module_sdk_idx), we could check the m_last_module_sdk_idx
directory, and then if that was unsuccessful, check all other entries !=
m_last_module_sdk_idx. But m_last_module_sdk_idx could mutate via
another thread, and we skip one of our SDK Root directories. Resulting
in reading a binary out of memory, when we had a local copy of it.
[9 lines not shown]