cor3ntin added inline comments.
================ Comment at: clang/lib/Sema/SemaExprCXX.cpp:5515 + QualType UPtr = S.BuiltinAddPointer(S.BuiltinRemoveReference(U, UnaryTransformType::RemoveCVRef, {}), {}); + return EvaluateBinaryTypeTrait(S, TypeTrait::BTT_IsConvertibleTo, UPtr, TPtr, RParenLoc); } ---------------- cor3ntin wrote: > Could you put the implementation of `BTT_IsConvertibleTo` in its own function? I was thinking something like ``` QualType TPtr = S.Context.getPointerType(S.BuiltinRemoveReference(T, UnaryTransformType::RemoveCVRef, {})); QualType UPtr = S.Context.getPointerType(S.BuiltinRemoveReference(U, UnaryTransformType::RemoveCVRef, {})); return IsConvertibleTo(S, UPtr, TPtr); ``` and then EvaluateBinaryTypeTrait can use this new `IsConvertibleTo` (which we can extract from EvaluateBinaryTypeTrait) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135341/new/ https://reviews.llvm.org/D135341 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits