================
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -internal-isystem %S/../../lib/Headers/openmp_wrappers
-include __clang_openmp_device_functions.h -internal-isystem %S/Inputs/include
-x c++ -fopenmp -triple amdgpu-amd-amdhsa -aux-triple x86_64-unknown-unknown
-fopenmp-targets=amdgpu-amd-amdhsa -fopenmp-is-target-device -fsyntax-only
-verify %s
+
+// The OpenMP math wrapper pulls in __clang_hip_math.h, whose ::min and ::max
+// are a CUDA compatibility extension for HIP. In an OpenMP translation unit
+// these calls are ordinary unqualified C++ lookups and must resolve to std.
+
+// expected-no-diagnostics
+
+#include <algorithm>
+#include <cmath>
+
+using namespace std;
+
+long test_min(long __a, long __b) { return min(__a, __b); }
----------------
jhuber6 wrote:
Is there not an existing file this can go into?
https://github.com/llvm/llvm-project/pull/225162
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits