mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 05:27:49 +00:00
Use StorageClass::kNone for ast local var decls
To declare a local variable, we write `var name : type`, not `var<function> name : type`. This change fixes all the places where we were feeding StorageClass::kFunction into variable declarations. Note that the resolved, semantic variable correctly infers the `kFunction` StorageClass. Change-Id: I6221fabae1de0435044f29b9a91808421d5cace6 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/50821 Commit-Queue: Ben Clayton <bclayton@chromium.org> Commit-Queue: David Neto <dneto@google.com> Auto-Submit: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: David Neto <dneto@google.com>
This commit is contained in:
committed by
Commit Bot service account
parent
884a4e2172
commit
f6c84e4d45
@@ -1189,7 +1189,7 @@ class ProgramBuilder {
|
||||
template <typename NAME>
|
||||
ast::Variable* Var(NAME&& name,
|
||||
ast::Type* type,
|
||||
ast::StorageClass storage,
|
||||
ast::StorageClass storage = ast::StorageClass::kNone,
|
||||
ast::Expression* constructor = nullptr,
|
||||
ast::DecorationList decorations = {}) {
|
||||
type = ty.MaybeCreateTypename(type);
|
||||
@@ -1208,7 +1208,7 @@ class ProgramBuilder {
|
||||
ast::Variable* Var(const Source& source,
|
||||
NAME&& name,
|
||||
ast::Type* type,
|
||||
ast::StorageClass storage,
|
||||
ast::StorageClass storage = ast::StorageClass::kNone,
|
||||
ast::Expression* constructor = nullptr,
|
||||
ast::DecorationList decorations = {}) {
|
||||
type = ty.MaybeCreateTypename(type);
|
||||
|
||||
Reference in New Issue
Block a user