mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-01 02:43:29 +00:00
Handle fallthrough, kill and nop in type determination.
These statements have no expressions to determine so they just return true. Bug: tint:5 Change-Id: I639bce9c254c12357ac3a1d2a9cfaaee437716c0 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18833 Reviewed-by: David Neto <dneto@google.com>
This commit is contained in:
parent
0cf685f728
commit
1913fc9d3b
@ -96,6 +96,15 @@ bool TypeDeterminer::DetermineResultType(ast::Statement* stmt) {
|
|||||||
return DetermineResultType(e->condition()) &&
|
return DetermineResultType(e->condition()) &&
|
||||||
DetermineResultType(e->body());
|
DetermineResultType(e->body());
|
||||||
}
|
}
|
||||||
|
if (stmt->IsFallthrough()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (stmt->IsKill()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (stmt->IsNop()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
error_ = "unknown statement type for type determination";
|
error_ = "unknown statement type for type determination";
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user