[clang] [PAC] Ignore noexcept on function type when computing discriminator of member function pointers (PR #109056)
John McCall via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 16 11:08:09 PST 2025
================
@@ -3442,6 +3442,13 @@ uint16_t ASTContext::getPointerAuthTypeDiscriminator(QualType T) {
encodeTypeForFunctionPointerAuth(*this, Out, T);
} else {
T = T.getUnqualifiedType();
+ // Drop exception specification from member function pointer type.
+ if (auto *MPT = T->getAs<MemberPointerType>())
+ if (MPT->isMemberFunctionPointer()) {
+ QualType FT =
+ getFunctionTypeWithExceptionSpec(MPT->getPointeeType(), EST_None);
+ T = getMemberPointerType(FT, MPT->getClass());
----------------
rjmccall wrote:
Let's try to avoid rebuilding if the type already doesn't have an exception spec.
https://github.com/llvm/llvm-project/pull/109056
More information about the cfe-commits
mailing list