check_warning.hlsl 396 B

12345678910
  1. // RUN: %dxc -E main -T ps_6_0 %s | FileCheck %s
  2. // CHECK: warning: attribute 'branch' can only be applied to 'if' and 'switch' statements
  3. [branch] // this should generate a warning that is used for testing
  4. float4 main() : SV_TARGET
  5. {
  6. // no return stmt should cause error which is needed to direct errors
  7. // and warnings to stdin instead of dxil output.
  8. // return float4(1, 0, 0, 1);
  9. }