mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-12 14:46:08 +00:00
tint: Deprecated module-scope 'let' for 'const'
Enable the parsing of 'const'. Warn on use of module-scope 'let', and automatically replace with 'const'. Fixed: tint:1580 Change-Id: I214aabca80686dc6b60ae21a7a57fbfb4898ea83 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/93786 Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: Dan Sinclair <dsinclair@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
03f88e6f49
commit
c64ca23d94
@@ -1,7 +1,6 @@
|
||||
let A : i32 = 1;
|
||||
let _A : i32 = 2;
|
||||
|
||||
fn f() {
|
||||
let A : i32 = 1;
|
||||
let _A : i32 = 2;
|
||||
let B = A;
|
||||
let _B = _A;
|
||||
}
|
||||
|
||||
@@ -4,10 +4,8 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void unused_entry_point() {
|
||||
return;
|
||||
}
|
||||
const int A = 1;
|
||||
const int _A = 2;
|
||||
void f() {
|
||||
int B = A;
|
||||
int _B = _A;
|
||||
int B = 1;
|
||||
int _B = 2;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,10 +3,7 @@ void unused_entry_point() {
|
||||
return;
|
||||
}
|
||||
|
||||
static const int A = 1;
|
||||
static const int _A = 2;
|
||||
|
||||
void f() {
|
||||
const int B = A;
|
||||
const int _B = _A;
|
||||
const int B = 1;
|
||||
const int _B = 2;
|
||||
}
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
constant int A = 1;
|
||||
|
||||
constant int _A = 2;
|
||||
|
||||
void f() {
|
||||
int const A = 1;
|
||||
int const _A = 2;
|
||||
int const B = A;
|
||||
int const _B = _A;
|
||||
}
|
||||
|
||||
@@ -7,20 +7,18 @@
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
|
||||
OpExecutionMode %unused_entry_point LocalSize 1 1 1
|
||||
OpName %A "A"
|
||||
OpName %_A "_A"
|
||||
OpName %unused_entry_point "unused_entry_point"
|
||||
OpName %f "f"
|
||||
%int = OpTypeInt 32 1
|
||||
%A = OpConstant %int 1
|
||||
%_A = OpConstant %int 2
|
||||
%void = OpTypeVoid
|
||||
%4 = OpTypeFunction %void
|
||||
%unused_entry_point = OpFunction %void None %4
|
||||
%7 = OpLabel
|
||||
%1 = OpTypeFunction %void
|
||||
%int = OpTypeInt 32 1
|
||||
%int_1 = OpConstant %int 1
|
||||
%int_2 = OpConstant %int 2
|
||||
%unused_entry_point = OpFunction %void None %1
|
||||
%4 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%f = OpFunction %void None %4
|
||||
%9 = OpLabel
|
||||
%f = OpFunction %void None %1
|
||||
%6 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
let A : i32 = 1;
|
||||
|
||||
let _A : i32 = 2;
|
||||
|
||||
fn f() {
|
||||
let A : i32 = 1;
|
||||
let _A : i32 = 2;
|
||||
let B = A;
|
||||
let _B = _A;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user