jlebar added inline comments.

================
Comment at: test/SemaCUDA/function-template-overload.cu:62
+template <typename T> constexpr T overload_ce_implicit_hd(T a) { return a+1; }
+// expected-note@-1 3 {{candidate template ignored: target attributes do not 
match}}
+
----------------
Oh, I didn't know you could specify a count like this.  I have a bunch of tests 
to fix now!


================
Comment at: test/SemaCUDA/function-template-overload.cu:79
+template <> constexpr double overload_ce_implicit_hd(double a) { return a + 
3.0; };
+
 __host__ void hf() {
----------------
D25809's patch description says:

> [New behavior]: Require matching target attributes for explicit function 
> template instantiation/specialization and narrow [the] list of candidates to 
> templates with the same target.

Based on this, I do not see why most of the "these should work" candidates work.

Rather than explain here, can you please add a comment to the test?

(At some point someone is probably going to have to write down and make sense 
of all of the semantics we have invented.  It's going to be a pain either way, 
but at least we can preserve our reasoning in code rather than phab comments.)


https://reviews.llvm.org/D25845



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to