[PATCH] D25809: [CUDA] Improved target attribute-based overloading.

Artem Belevich via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 24 15:15:06 PDT 2016


tra added inline comments.


================
Comment at: lib/Sema/SemaCUDA.cpp:791
+  CUDAFunctionTarget NewTarget = IdentifyCUDATarget(NewFD);
+  for (auto OldND : Previous) {
+    FunctionDecl *OldFD = OldND->getAsFunction();
----------------
jlebar wrote:
> tra wrote:
> > jlebar wrote:
> > > If this is just a Decl* or NamedDecl*, can we write out the type?
> > I'm not sure what exactly you'd like to see. Diags will print out the line and target info for both sides.
> > Could you give me example of existing diagnostics that would be similar to what you want?
> Sorry, I just meant for you to change "auto" to the actual type.
Ah! That would be `NamedDecl *` Done..


================
Comment at: lib/Sema/SemaTemplate.cpp:7047
+      // target. Given that regular template deduction does not take
+      // it into account, we perform target match check here and
+      // reject candidates that have different target.
----------------
jlebar wrote:
> what is "it"?  Do you mean "the function signature", or something else?
it = "target attributes"


https://reviews.llvm.org/D25809





More information about the cfe-commits mailing list