This feature can be used to implement gold compatible --icf=safe in LLD, which is used in some Android and Chrome builds.
In C++, ctors and dtors are not allowed to be taken addresses. This
property is exploited by gold --icf=safe to fold only ctors and dtors.
We don't need to be very precise here to catch all the cases,
false negatives would not hurt.
Seems kinda strange to talk about LLD here, this isn't necessarily a LLD-specific function. Maybe just say that false negatives are possible?
We don't even need to conservatively allow false-negatives here though, it would be straightforward to exactly match all constructor/destructors, right? You just need to add AbiTagAttr and StdQualifiedName to your loop below.