1 // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - -fsyntax-only %s -verify
3 // expected-error@+2 {{expected identifier}}
4 // expected-error@+1 {{expected unqualified-id}}
6 // expected-error@+1 {{expected '{'}}
7 cbuffer missing_definition;
8 // expected-error@+1 {{expected unqualified-id}}
10 // expected-error@+1 {{expected identifier}}
13 // expected-error@+2 {{expected identifier}}
14 // expected-error@+1 {{expected unqualified-id}}
16 // expected-error@+1 {{expected '{'}}
17 tbuffer missing_definition;
18 // expected-error@+1 {{expected unqualified-id}}
20 // expected-error@+1 {{expected identifier}}
23 // expected-error@+1 {{expected unqualified-id}}
26 // cbuffer inside namespace is supported.
34 // expected-error@+1 {{invalid declaration inside cbuffer}}
40 // expected-error@+1 {{invalid declaration inside cbuffer}}
46 // expected-error@+1 {{expected member name or ';' after declaration specifiers}}
53 // expected-error@+1 {{expected expression}}
58 decltype(derp) another {
63 // struct decl inside cb is supported.
71 // function decl inside cb is supported.
73 float foo_inside_cb() { return 1.2;}