[PATCH] D16870: [CUDA] Tweak attribute-based overload resolution to match nvcc behavior.

Artem Belevich via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 9 10:18:17 PST 2016


tra planned changes to this revision.
tra added a comment.

Previously accepted version was dependent on order of functions in overload set.
In order to make ordering consistent, WrongSide functions are now removed from the 
set before pair-wise comparison of candidates. Please take a look.


================
Comment at: lib/Sema/SemaCUDA.cpp:71
@@ -70,3 +70,3 @@
 // H  - handled in (x)
-// Preferences: b-best, f-fallback, l-last resort, n-never.
+// Preferences: +:native, *:host-device, o:same side, .:wrong side, -:never.
 //
----------------
jlebar wrote:
> If we're going to use symbols rather than letters, could we use 4, 3, 2, 1, 0?  I think that would be easier to follow.
I considered that but found that numbers require more mental effort to map them back to what's supposed to happen for particular call combination. Letters were not sufficiently distinct visually (hard to tell l/f h/n at a glance). Current scheme works best for me. '+*o' == good. '-.' == bad.


http://reviews.llvm.org/D16870





More information about the cfe-commits mailing list