[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaHLSL / GlobalConstructors.hlsl
blobddd09422d748525a6cbfd90e9fce4cafef66b462
1 // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -fsyntax-only %s -verify
3 int i;
5 struct Pup {
6   Pup() {
7     i++;
8   }
9 };
11 // expected-error@+1 {{initializer priorities are not supported in HLSL}}
12 Pup __attribute__((init_priority(1))) Fido;
14 // expected-error@+1 {{initializer priorities are not supported in HLSL}}
15 __attribute__((constructor(1))) void call_me_first(void) {
16   i = 12;