AdaptiveCpp
AdaptiveCpp copied to clipboard
Add missing prefixes when checking if function is in `std` namespace
According to the Itanium ABI spec certain classes in the std
namespace have their own abbreviations and do not start with St
so the current check would not mark them as std
functions. However, I am not sure if these abbreviations are actually used by the LLVM Itanium mangler. I haven't looked at the source code yet but I looked at the symbols of some test applications using nm
and all mangled names of std::
functions started with _ZSt
, _ZNSt
or _ZNKSt
(this last one is for const
member functions and was missing previously), so maybe it is enough to just check for these three.
Opening this as a draft for now until I'm sure which is the correct approach (hoping that someone who knows more about this sees this and can comment on it).
I opened #1224 which only contains the additional check for const
member functions. I'm quite sure that this is actually missing, so I think we can safely include #1224 in the release but should do more research about the other checks included in this PR.