dawn-cmake/src/ast
Antonio Maiorano f1b643ee70 Improve binary expression validation error message
Example:
```
  var a : i32;
  var b : f32;
  if (a == b) {
    return vec4<f32>(0.4, 0.4, 0.8, 1.0);
  }
```

Outputs:
```
error: test7.wgsl:6:9 error: Binary expression operand types are invalid for this operation: i32 equal f32
  if (a == b) {
        ^^
```

Bug: tint:663
Change-Id: Idd2bb5a248b3c7d652483931d7dd58d5123e9ee8
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/46640
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
2021-04-01 19:40:37 +00:00
..
access_control.cc ast/type: Remove Type suffix from all types 2020-11-30 23:30:58 +00:00
access_control.h [ast] Unify the access control types. 2020-10-29 13:36:32 +00:00
access_decoration.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
access_decoration.h Flatten ast::Decoration class hierarchy 2021-03-11 17:39:32 +00:00
access_decoration_test.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
array_accessor_expression.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
array_accessor_expression.h ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
array_accessor_expression_test.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
assignment_statement.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
assignment_statement.h ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
assignment_statement_test.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
binary_expression.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
binary_expression.h Improve binary expression validation error message 2021-04-01 19:40:37 +00:00
binary_expression_test.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
binding_decoration.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
binding_decoration.h Flatten ast::Decoration class hierarchy 2021-03-11 17:39:32 +00:00
binding_decoration_test.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
bitcast_expression.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
bitcast_expression.h ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
bitcast_expression_test.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
block_statement.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
block_statement.h Add semantic::Statement::Block() for getting the owning BlockStatement 2021-03-31 20:35:46 +00:00
block_statement_test.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
bool_literal.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
bool_literal.h ast: Remove @notes about semantic info not being cloned 2021-02-17 01:01:03 +00:00
bool_literal_test.cc Remove ast::NullLiteral 2021-03-22 16:06:35 +00:00
break_statement.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
break_statement.h ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
break_statement_test.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
builtin.cc [ast] Rename Builtin::kSampleId to Builtin::kSampleIndex 2021-02-16 18:21:41 +00:00
builtin.h [ast] Rename Builtin::kSampleId to Builtin::kSampleIndex 2021-02-16 18:21:41 +00:00
builtin_decoration.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
builtin_decoration.h Flatten ast::Decoration class hierarchy 2021-03-11 17:39:32 +00:00
builtin_decoration_test.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
call_expression.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
call_expression.h ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
call_expression_test.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
call_statement.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
call_statement.h ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
call_statement_test.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
case_statement.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
case_statement.h ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
case_statement_test.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
constant_id_decoration.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
constant_id_decoration.h Flatten ast::Decoration class hierarchy 2021-03-11 17:39:32 +00:00
constant_id_decoration_test.cc Simplify calls to ast::Node::[to_]str() 2021-01-29 11:22:40 +00:00
constructor_expression.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
constructor_expression.h ast: Remove expression constructors that don't take a Source 2020-12-12 01:38:13 +00:00
continue_statement.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
continue_statement.h ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
continue_statement_test.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
decoration.cc Flatten ast::Decoration class hierarchy 2021-03-11 17:39:32 +00:00
decoration.h Flatten ast::Decoration class hierarchy 2021-03-11 17:39:32 +00:00
discard_statement.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
discard_statement.h ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
discard_statement_test.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
else_statement.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
else_statement.h ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
else_statement_test.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
expression.cc Rename TINT_INSTANTIATE_CLASS_ID() 2021-03-02 20:51:18 +00:00
expression.h Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
fallthrough_statement.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
fallthrough_statement.h ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
fallthrough_statement_test.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
float_literal.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
float_literal.h ast: Remove @notes about semantic info not being cloned 2021-02-17 01:01:03 +00:00
float_literal_test.cc Remove ast::NullLiteral 2021-03-22 16:06:35 +00:00
function.cc Add semantic::Variable::Type() and use it instead of ast::Variable::type() 2021-03-26 12:47:58 +00:00
function.h [wgsl-reader] Allow decorations on function return types 2021-03-15 17:01:34 +00:00
function_test.cc Flatten ast::Decoration class hierarchy 2021-03-11 17:39:32 +00:00
group_decoration.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
group_decoration.h Flatten ast::Decoration class hierarchy 2021-03-11 17:39:32 +00:00
group_decoration_test.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
identifier_expression.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
identifier_expression.h ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
identifier_expression_test.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
if_statement.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
if_statement.h ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
if_statement_test.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
int_literal.cc Rename TINT_INSTANTIATE_CLASS_ID() 2021-03-02 20:51:18 +00:00
int_literal.h Make IntLiteral store and return a u32 value 2021-02-26 22:56:16 +00:00
int_literal_test.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
intrinsic_texture_helper_test.cc Flatten ast::Decoration class hierarchy 2021-03-11 17:39:32 +00:00
intrinsic_texture_helper_test.h Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
literal.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
literal.h ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
location_decoration.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
location_decoration.h Flatten ast::Decoration class hierarchy 2021-03-11 17:39:32 +00:00
location_decoration_test.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
loop_statement.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
loop_statement.h ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
loop_statement_test.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
member_accessor_expression.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
member_accessor_expression.h ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
member_accessor_expression_test.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
module.cc Replace all uses of assert() with TINT_ICE macros 2021-03-31 20:43:26 +00:00
module.h Enable InsertBefore to work on global declarations 2021-03-17 09:26:04 +00:00
module_clone_test.cc Move Switch validation from Validator to Resolver 2021-03-25 12:55:27 +00:00
module_test.cc Flatten ast::Decoration class hierarchy 2021-03-11 17:39:32 +00:00
node.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
node.h ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
pipeline_stage.cc Initial commit 2020-03-02 15:47:43 -05:00
pipeline_stage.h Initial commit 2020-03-02 15:47:43 -05:00
return_statement.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
return_statement.h ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
return_statement_test.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
scalar_constructor_expression.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
scalar_constructor_expression.h ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
scalar_constructor_expression_test.cc Remove ast::NullLiteral 2021-03-22 16:06:35 +00:00
sint_literal.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
sint_literal.h Make IntLiteral store and return a u32 value 2021-02-26 22:56:16 +00:00
sint_literal_test.cc Remove ast::NullLiteral 2021-03-22 16:06:35 +00:00
stage_decoration.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
stage_decoration.h Flatten ast::Decoration class hierarchy 2021-03-11 17:39:32 +00:00
stage_decoration_test.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
statement.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
statement.h Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
storage_class.cc Update storage_buffer storage class. 2021-01-18 21:06:34 +00:00
storage_class.h s/sharable/shareable 2021-03-18 21:03:24 +00:00
stride_decoration.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
stride_decoration.h Flatten ast::Decoration class hierarchy 2021-03-11 17:39:32 +00:00
stride_decoration_test.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
struct.cc Flatten ast::Decoration class hierarchy 2021-03-11 17:39:32 +00:00
struct.h Flatten ast::Decoration class hierarchy 2021-03-11 17:39:32 +00:00
struct_block_decoration.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
struct_block_decoration.h Flatten ast::Decoration class hierarchy 2021-03-11 17:39:32 +00:00
struct_member.cc Flatten ast::Decoration class hierarchy 2021-03-11 17:39:32 +00:00
struct_member.h Flatten ast::Decoration class hierarchy 2021-03-11 17:39:32 +00:00
struct_member_align_decoration.cc Implement Default Struct Layout 2021-03-15 10:43:11 +00:00
struct_member_align_decoration.h Implement Default Struct Layout 2021-03-15 10:43:11 +00:00
struct_member_align_decoration_test.cc Implement Default Struct Layout 2021-03-15 10:43:11 +00:00
struct_member_offset_decoration.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
struct_member_offset_decoration.h Update DEPRECATED comments about offset decorations 2021-03-15 20:34:22 +00:00
struct_member_offset_decoration_test.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
struct_member_size_decoration.cc Implement Default Struct Layout 2021-03-15 10:43:11 +00:00
struct_member_size_decoration.h Implement Default Struct Layout 2021-03-15 10:43:11 +00:00
struct_member_size_decoration_test.cc Implement Default Struct Layout 2021-03-15 10:43:11 +00:00
struct_member_test.cc Implement Default Struct Layout 2021-03-15 10:43:11 +00:00
struct_test.cc Flatten ast::Decoration class hierarchy 2021-03-11 17:39:32 +00:00
switch_statement.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
switch_statement.h ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
switch_statement_test.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
test_helper.h Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
type_constructor_expression.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
type_constructor_expression.h ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
type_constructor_expression_test.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
uint_literal.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
uint_literal.h Make IntLiteral store and return a u32 value 2021-02-26 22:56:16 +00:00
uint_literal_test.cc Remove ast::NullLiteral 2021-03-22 16:06:35 +00:00
unary_op.cc Initial commit 2020-03-02 15:47:43 -05:00
unary_op.h Initial commit 2020-03-02 15:47:43 -05:00
unary_op_expression.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
unary_op_expression.h ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
unary_op_expression_test.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
variable.cc Add type inference support to Resolver 2021-03-31 12:46:52 +00:00
variable.h Add ast::Variable::BindingPoint 2021-03-29 21:21:35 +00:00
variable_decl_statement.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
variable_decl_statement.h ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
variable_decl_statement_test.cc ast: Replace IsValid() with TINT_ASSERT() 2021-03-10 11:41:49 +00:00
variable_test.cc Add ast::Variable::BindingPoint 2021-03-29 21:21:35 +00:00
workgroup_decoration.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
workgroup_decoration.h Flatten ast::Decoration class hierarchy 2021-03-11 17:39:32 +00:00
workgroup_decoration_test.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00