[PATCH] D150965: [HIP] Allow std::malloc in device function

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 19 11:01:37 PDT 2023


yaxunl 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);
----------------
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.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150965/new/

https://reviews.llvm.org/D150965



More information about the cfe-commits mailing list