mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-17 08:57:26 +00:00
Replace all uses of assert() with TINT_ICE macros
Use TINT_ICE() where we have diagnostics, TINT_ASSERT() where we do not. Change-Id: Ic6e842a7afdd957654c3461e5d03ecec7332e6f9 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/46444 Commit-Queue: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
committed by
Commit Bot service account
parent
dba65b7a34
commit
90f43cf87f
@@ -1329,7 +1329,10 @@ type::Type* Resolver::TypeOf(ast::Expression* expr) {
|
||||
}
|
||||
|
||||
void Resolver::SetType(ast::Expression* expr, type::Type* type) {
|
||||
assert(expr_info_.count(expr) == 0);
|
||||
if (expr_info_.count(expr)) {
|
||||
TINT_ICE(builder_->Diagnostics())
|
||||
<< "SetType() called twice for the same expression";
|
||||
}
|
||||
expr_info_.emplace(expr, ExpressionInfo{type, current_statement_});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user