[PATCH] D77239: [CUDA][NFCI] Use unqualified lookup for math functions

Johannes Doerfert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 1 13:30:56 PDT 2020


jdoerfert created this revision.
jdoerfert added a reviewer: tra.
Herald added subscribers: bollu, yaxunl.
Herald added a project: clang.
jdoerfert added a child revision: D77240: [CUDA] Add missing cmath overloads.

The other macro uses a unqualified lookup already and the qualified one
will cause problems in the OpenMP overlay.

Depends on D77238 <https://reviews.llvm.org/D77238>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D77239

Files:
  clang/lib/Headers/__clang_cuda_cmath.h


Index: clang/lib/Headers/__clang_cuda_cmath.h
===================================================================
--- clang/lib/Headers/__clang_cuda_cmath.h
+++ clang/lib/Headers/__clang_cuda_cmath.h
@@ -191,7 +191,7 @@
       typename __clang_cuda_enable_if<std::numeric_limits<__T>::is_integer,    \
                                       __retty>::type                           \
       __fn(__T __x) {                                                          \
-    return ::__fn((double)__x);                                                \
+    return __fn((double)__x);                                                  \
   }
 
 // Defines an overload of __fn that accepts one two arithmetic arguments, calls


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77239.254290.patch
Type: text/x-patch
Size: 718 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200401/8eb01abd/attachment.bin>


More information about the cfe-commits mailing list