void-param.hlsl 971 B

12345678910111213141516171819202122232425262728
  1. // RUN: %dxc -E main -T ps_6_0 %s | FileCheck %s
  2. // CHECK-NOT: error: empty parameter list defined with a typedef of 'void' not allowed in HLSL
  3. // CHECK: void-param.hlsl:12:16: error: argument may not have 'void' type
  4. // CHECK: void-param.hlsl:14:16: error: pointers are unsupported in HLSL
  5. // CHECK: void-param.hlsl:16:10: error: 'void' as parameter must not have type qualifiers
  6. // CHECK: void-param.hlsl:18:10: error: 'void' must be the first and only parameter if specified
  7. // CHECK: void-param.hlsl:20:17: error: variadic arguments is unsupported in HLSL
  8. // CHECK: void-param.hlsl:20:10: error: 'void' must be the first and only parameter if specified
  9. // CHECK: void-param.hlsl:22:10: error: 'void' must be the first and only parameter if specified
  10. void foo2(void a) {}
  11. void foo2(void *p) {}
  12. void foo3(const void) {}
  13. void foo4(float a, void) {}
  14. void foo5(void, ...) {}
  15. void foo6(void, float a) {}
  16. void foo1(void) {}
  17. float4 main() : SV_TARGET {
  18. return 0;
  19. }