Debian Codegraph @

clang/test/SemaHLSL/GlobalConstructors.hlsl

raw
1 // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -fsyntax-only %s -verify
2
3 int i;
4
5 struct Pup {
6 Pup() {
7 i++;
8 }
9 };
10
11 // expected-error@+1 {{initializer priorities are not supported in HLSL}}
12 Pup __attribute__((init_priority(1))) Fido;
13
14 // expected-error@+1 {{initializer priorities are not supported in HLSL}}
15 __attribute__((constructor(1))) void call_me_first(void) {
16 i = 12;
17 }
18