brintos

brintos / llvm-project-archived public Read only

0
0
Text · 676 B · fdba6f6 Raw
18 lines · plain
1// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -fsyntax-only -hlsl-entry main -verify %s2 3typedef float t_f : SEMANTIC; // expected-warning{{'SEMANTIC' attribute only applies to parameters, non-static data members, and functions}}4 5struct semantic_on_struct : SEMANTIC { // expected-error{{expected class name}}6  float a;7};8 9struct s_fields_multiple_semantics {10  float a : semantic_a : semantic_c; // expected-error{{use of undeclared identifier 'semantic_c'}}11  float b : semantic_b;12};13 14[numthreads(1, 1, 1)]15void main() {16  float a : SEM_A; // expected-warning{{'SEM_A' attribute only applies to parameters, non-static data members, and functions}}17}18