1 // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -x hlsl -o - -fsyntax-only %s -verify
3 // expected-error@+1 {{pointers are unsupported in HLSL}}
4 typedef int (*fn_int)(int);
5 void* bark(int); // expected-error {{pointers are unsupported in HLSL}}
6 void meow(int*); // expected-error {{pointers are unsupported in HLSL}}
11 } *bad; // expected-error {{pointers are unsupported in HLSL}}
13 // expected-error@+1 {{pointers are unsupported in HLSL}}
14 void woof(int Foo::*Member);
20 // expected-error@+2 {{the '&' operator is unsupported in HLSL}}
21 // expected-error@+1 {{pointers are unsupported in HLSL}}
22 int Foo::*Member = &F.X;
25 // expected-error@+1 {{the '&' operator is unsupported in HLSL}}
26 int *Y = &X; // expected-error {{pointers are unsupported in HLSL}}
28 // expected-error@+2 {{the '->' operator is unsupported in HLSL}}
29 // expected-error@+1 {{the '&' operator is unsupported in HLSL}}
33 // expected-error@+1 {{the '&' operator is unsupported in HLSL}}
34 *(&Array[0] + 1) = 12;
35 // expected-error@+1 {{the '*' operator is unsupported in HLSL}}
39 int roar(Foo *F) { // expected-error {{pointers are unsupported in HLSL}}
40 // expected-error@+1 {{the '->' operator is unsupported in HLSL}}
45 void devilish_language(T look_ma_no_pointers);
49 // expected-error@+1 {{the '&' operator is unsupported in HLSL}}
50 devilish_language(&X);
52 // not-expected-error@+1 {{pointers are unsupported in HLSL}}
53 devilish_language(roar); // allow function pointer decay
55 // not-expected-error@+1 {{pointers are unsupported in HLSL}}
56 devilish_language("roar"); // allow array pointer decay
69 // expected-note@+1 {{'->' applied to return value of the operator->() declared here}}
77 int Result = *F; // user-defined dereference operators work
78 // expected-error@+1 {{member reference type 'Fins' is not a pointer}}