Debian Codegraph @

clang/test/SemaHLSL/BuiltIns/binary-compat-overload-warnings.hlsl

raw
1 // RUN: %clang_cc1 -finclude-default-header -triple dxilv1.0-unknown-shadermodel6.0-compute -std=hlsl202x -emit-llvm-only -disable-llvm-passes -DFUNC=atan2 %s 2>&1 | FileCheck %s -DFUNC=atan2
2 // RUN: %clang_cc1 -finclude-default-header -triple dxilv1.0-unknown-shadermodel6.0-compute -std=hlsl202x -emit-llvm-only -disable-llvm-passes -DFUNC=pow %s 2>&1 | FileCheck %s -DFUNC=pow
3 // RUN: %clang_cc1 -finclude-default-header -triple dxilv1.0-unknown-shadermodel6.0-compute -std=hlsl202x -emit-llvm-only -disable-llvm-passes -DFUNC=step %s 2>&1 | FileCheck %s -DFUNC=step
4
5 // binary double overloads
6 float test_binary_double(double p0) {
7 // CHECK: warning: '[[FUNC]]' is deprecated: In 202x 64 bit API lowering for [[FUNC]] is deprecated. Explicitly cast parameters to 32 or 16 bit types.
8 return FUNC(p0, p0);
9 }
10
11 float2 test_binary_double2(double2 p0) {
12 // CHECK: warning: '[[FUNC]]' is deprecated: In 202x 64 bit API lowering for [[FUNC]] is deprecated. Explicitly cast parameters to 32 or 16 bit types.
13 return FUNC(p0, p0);
14 }
15
16 float3 test_binary_double3(double3 p0) {
17 // CHECK: warning: '[[FUNC]]' is deprecated: In 202x 64 bit API lowering for [[FUNC]] is deprecated. Explicitly cast parameters to 32 or 16 bit types.
18 return FUNC(p0, p0);
19 }
20
21 float4 test_binary_double4(double4 p0) {
22 // CHECK: warning: '[[FUNC]]' is deprecated: In 202x 64 bit API lowering for [[FUNC]] is deprecated. Explicitly cast parameters to 32 or 16 bit types.
23 return FUNC(p0, p0);
24 }
25
26 // binary integer overloads
27 // only test scalar ones for brevity
28 float test_binary_int(int p0) {
29 // CHECK: warning: '[[FUNC]]' is deprecated: In 202x int lowering for [[FUNC]] is deprecated. Explicitly cast parameters to float types.
30 return FUNC(p0, p0);
31 }
32
33 float test_binary_int(uint p0) {
34 // CHECK: warning: '[[FUNC]]' is deprecated: In 202x int lowering for [[FUNC]] is deprecated. Explicitly cast parameters to float types.
35 return FUNC(p0, p0);
36 }
37
38 float test_binary_int(int64_t p0) {
39 // CHECK: warning: '[[FUNC]]' is deprecated: In 202x int lowering for [[FUNC]] is deprecated. Explicitly cast parameters to float types.
40 return FUNC(p0, p0);
41 }
42
43 float test_binary_int(uint64_t p0) {
44 // CHECK: warning: '[[FUNC]]' is deprecated: In 202x int lowering for [[FUNC]] is deprecated. Explicitly cast parameters to float types.
45 return FUNC(p0, p0);
46 }