[prev in list] [next in list] [prev in thread] [next in thread]
List: cfe-commits
Subject: Re: [PATCH] D12453: [CUDA] Allow function overloads based on host/device attributes.
From: Eli Bendersky via cfe-commits <cfe-commits () lists ! llvm ! org>
Date: 2015-08-31 22:59:40
Message-ID: 30567674b49666c36a6d44e603090bec () localhost ! localdomain
[Download RAW message or body]
eliben added inline comments.
================
Comment at: include/clang/Sema/Sema.h:8599
@@ +8598,3 @@
+ CFP_Never, // Invalid caller/callee combination.
+ CFP_LastResort, // same as CFP_Never or CFP_Fallback, depending on
+ // -fcuda-disable-target-call-checks option
----------------
The comment should explain exactly how it depends on the option
================
Comment at: lib/AST/ItaniumMangle.cpp:504
@@ +503,3 @@
+ if (FD->hasAttr<CUDADeviceAttr>() && FD->hasAttr<CUDAHostAttr>())
+ Out << "Ua6deviceUa4host";
+
----------------
Why device before host?
================
Comment at: lib/Sema/SemaCUDA.cpp:98
@@ +97,3 @@
+ CUDAFunctionTarget CallerTarget =
+ Caller ? IdentifyCUDATarget(Caller) : Sema::CFT_Host,
+ CalleeTarget = IdentifyCUDATarget(Callee);
----------------
Why allow Caller to be nullptr but not Callee? Also, != nullptr?
================
Comment at: lib/Sema/SemaExprCXX.cpp:2277
@@ +2276,3 @@
+ Matches.set_size(N);
+ } else
+ ++I;
----------------
Nit: wrap the ++I in braces too, otherwise this looks really weird
http://reviews.llvm.org/D12453
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic