1 // RUN: %clang_cc1 -triple dxil-pc-shadermodel5.0-library -verify %s
3 __attribute__((availability(shadermodel, introduced = 6.0)))
4 unsigned fn6_0(); // #fn6_0
6 __attribute__((availability(shadermodel, introduced = 5.1)))
7 unsigned fn5_1(); // #fn5_1
9 __attribute__((availability(shadermodel, introduced = 5.0)))
13 // expected-warning@#fn6_0_site {{'fn6_0' is only available on HLSL ShaderModel 6.0 or newer}}
14 // expected-note@#fn6_0 {{'fn6_0' has been marked as being introduced in HLSL ShaderModel 6.0 here, but the deployment target is HLSL ShaderModel 5.0}}
15 // expected-note@#fn6_0_site {{enclose 'fn6_0' in a __builtin_available check to silence this warning}}
16 unsigned A = fn6_0(); // #fn6_0_site
18 // expected-warning@#fn5_1_site {{'fn5_1' is only available on HLSL ShaderModel 5.1 or newer}}
19 // expected-note@#fn5_1 {{'fn5_1' has been marked as being introduced in HLSL ShaderModel 5.1 here, but the deployment target is HLSL ShaderModel 5.0}}
20 // expected-note@#fn5_1_site {{enclose 'fn5_1' in a __builtin_available check to silence this warning}}
21 unsigned B = fn5_1(); // #fn5_1_site