[PATCH] D57716: [CUDA][HIP] Check calling convention based on function target

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 21 14:26:01 PST 2019


tra added inline comments.


================
Comment at: test/SemaCUDA/amdgpu-windows-vectorcall.cu:3
+
+// expected-no-diagnostics
+template<class _Ty>
----------------
tra wrote:
> It may be good to add a check where we *would* expect to see the diagnostics.
> It may be good to add a check where we *would* expect to see the diagnostics.

Scratch that.  Wrong calling convention attribute will be ignored. 


================
Comment at: test/SemaCUDA/amdgpu-windows-vectorcall.cu:9-10
+
+template<class _Ret, class _Arg0, class _Types> struct A<_Ret (__cdecl _Arg0::*)(_Types) > { };
+template<class _Ret, class _Arg0, class _Types> struct A<_Ret (__vectorcall _Arg0::*)(_Types) > {};
+
----------------
I don't think we need templates here. We're only making sure that the function attributes are handled correctly.
Can we get by with a regular function declaration or definition?




CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57716/new/

https://reviews.llvm.org/D57716





More information about the cfe-commits mailing list