| 1 |
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -fsyntax-only -hlsl-entry main -verify %s |
| 2 |
|
| 3 |
typedef float t_f : SEMANTIC; // expected-warning{{'SEMANTIC' attribute only applies to parameters, non-static data members, and functions}} |
| 4 |
|
| 5 |
struct semantic_on_struct : SEMANTIC { // expected-error{{expected class name}} |
| 6 |
float a; |
| 7 |
}; |
| 8 |
|
| 9 |
struct 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)] |
| 15 |
void main() { |
| 16 |
float a : SEM_A; // expected-warning{{'SEM_A' attribute only applies to parameters, non-static data members, and functions}} |
| 17 |
} |