dawn-cmake/src/writer/wgsl
Antonio Maiorano 9ef17472e8 Add semantic::Variable::Type() and use it instead of ast::Variable::type()
In anticipation of adding support for type inference, no longer use
ast::Variable::type() everywhere, as it will eventually return nullptr
for type-inferred variables. Instead, the Resolver now stores the final
resolved type into the semantic::Variable, and nearly all code now makes
use of that.

ast::Variable::type() has been renamed to ast::Variable::declared_type()
to help make its usage clear, and to distinguish it from
semantic::Variable::Type().

Fixed tests that failed after this change because variables were missing
VariableDeclStatements, so there was no path to the variables during
resolving, and thus no semantic info generated for them.

Bug: tint:672
Change-Id: I0125e2f555839a4892248dc6739a72e9c7f51b1e
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/46100
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
2021-03-26 12:47:58 +00:00
..
generator.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
generator.h Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
generator_impl.cc Add semantic::Variable::Type() and use it instead of ast::Variable::type() 2021-03-26 12:47:58 +00:00
generator_impl.h writer/wgsl: Fix size / align decoration emission 2021-03-15 20:25:12 +00:00
generator_impl_alias_type_test.cc Implement Default Struct Layout 2021-03-15 10:43:11 +00:00
generator_impl_array_accessor_test.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
generator_impl_assign_test.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
generator_impl_binary_test.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
generator_impl_bitcast_test.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
generator_impl_block_test.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
generator_impl_break_test.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
generator_impl_call_test.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
generator_impl_case_test.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
generator_impl_cast_test.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
generator_impl_constructor_test.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
generator_impl_continue_test.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
generator_impl_discard_test.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
generator_impl_entry_point_test.cc Flatten ast::Decoration class hierarchy 2021-03-11 17:39:32 +00:00
generator_impl_fallthrough_test.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
generator_impl_function_test.cc [wgsl-writer] Generate decorations on function return types 2021-03-15 17:15:23 +00:00
generator_impl_global_decl_test.cc Flatten ast::Decoration class hierarchy 2021-03-11 17:39:32 +00:00
generator_impl_identifier_test.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
generator_impl_if_test.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
generator_impl_loop_test.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
generator_impl_member_accessor_test.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
generator_impl_return_test.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
generator_impl_switch_test.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
generator_impl_test.cc [wgsl-writer] Generate builtin and location decorations on struct members 2021-03-11 17:47:52 +00:00
generator_impl_type_test.cc Resolver: process nodes in order of declaration 2021-03-19 18:45:30 +00:00
generator_impl_unary_op_test.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
generator_impl_variable_decl_statement_test.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
generator_impl_variable_test.cc Add semantic::Variable::Type() and use it instead of ast::Variable::type() 2021-03-26 12:47:58 +00:00
test_helper.h Rename TypeDeterminer to Resolver 2021-03-09 10:54:37 +00:00