[all-commits] [llvm/llvm-project] db1d3b: [HIP] Fix __clang_hip_cmath.hip for ambiguity (#10...
Yaxun (Sam) Liu via All-commits
all-commits at lists.llvm.org
Fri Aug 2 15:37:43 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: db1d3b23a37c7a57fa8b9e5bc94e1b22e278d361
https://github.com/llvm/llvm-project/commit/db1d3b23a37c7a57fa8b9e5bc94e1b22e278d361
Author: Yaxun (Sam) Liu <yaxun.liu at amd.com>
Date: 2024-08-02 (Fri, 02 Aug 2024)
Changed paths:
M clang/lib/Headers/__clang_hip_cmath.h
M clang/test/Headers/__clang_hip_cmath.hip
Log Message:
-----------
[HIP] Fix __clang_hip_cmath.hip for ambiguity (#101341)
If there is a type T which can be converted to both float and double etc
but itself is not specialized for __numeric_type, and it is called for
math functions eg. fma, it will cause ambiguity with test function of
__numeric_type.
Since test is not template, this error is not bypassed by SFINAE. This
is a design flaw of __numeric_type. This patch fixes clang wrapper
header to use SFINAE to avoid such ambiguity.
Fixes: SWDEV-461604
Fixes: https://github.com/llvm/llvm-project/issues/101239
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list