16 lines · plain
1// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-compute -x hlsl -hlsl-entry foo -DWITH_NUM_THREADS -ast-dump -o - %s | FileCheck %s2// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-compute -x hlsl -hlsl-entry foo -o - %s -verify3 4 5// Make sure add HLSLShaderAttr along with HLSLNumThreadsAttr.6// CHECK:HLSLNumThreadsAttr 0x{{.*}} <line:10:2, col:18> 1 1 17// CHECK:HLSLShaderAttr 0x{{.*}} <line:13:1> Implicit Compute8 9#ifdef WITH_NUM_THREADS10[numthreads(1,1,1)]11#endif12// expected-error@+1 {{missing numthreads attribute for compute shader entry}}13void foo() {14 15}16