IvyXu420 wrote: > So if there is a 'target' type, we can correctly rule out the template > candidates
Yes, it uses a different path (AddressOfFunctionResolver) if there is a target type: https://github.com/llvm/llvm-project/blob/694d1a69de0dcbfedbd1e38959a57523f901ae6a/clang/lib/Sema/SemaOverload.cpp#L13923-L13931 If no target type is given, like `&S::operator int`, the path modified by this PR is used - it doesn't use AddressOfFunctionResolver since its constructor requires a TargetType, and there is a comment about it: https://github.com/llvm/llvm-project/blob/694d1a69de0dcbfedbd1e38959a57523f901ae6a/clang/lib/Sema/SemaOverload.cpp#L14341-L14343 So they are two separate paths, I don't think the underlying issue is somewhere else. https://github.com/llvm/llvm-project/pull/230806 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
