[PATCH] D150965: [HIP] Allow std::malloc in device function
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 19 11:30:24 PDT 2023
tra added inline comments.
================
Comment at: clang/test/Headers/Inputs/include/math.h:108-109
long lroundf(float __a);
-int max(int __a, int __b);
-int min(int __a, int __b);
double modf(double __a, double *__b);
----------------
yaxunl wrote:
> tra wrote:
> > Why were these functions removed? It does not seem related to the changes in the patch?
> These functions caused failure in the added lit test.
>
> For C++, max/min are defined as templates in <algorithm>. There is no max/min in either standard C or C++ math.h. Their existence cause false alarms in lit tests. Removing them to be consistent with standard C/C++ headers.
I suspect those may have been used for some CUDA tests. CUDA headers used to define `::min()` and `::max()`.
As long as it does not affect the tests, removing them is fine.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150965/new/
https://reviews.llvm.org/D150965
More information about the cfe-commits
mailing list