mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 21:47:47 +00:00
Fix Undefined Behaviour
All caused by calling Castable::As<> on nullptr objects. Bug: tint:760 Change-Id: I0a408b3cd58086cfeab5a1af34d643f50f304948 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/49523 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
committed by
Commit Bot service account
parent
30c03a5d50
commit
9481156eb9
@@ -1396,7 +1396,7 @@ Maybe<ParserImpl::FunctionHeader> ParserImpl::function_header() {
|
||||
return_type = type.value;
|
||||
}
|
||||
|
||||
if (return_type.ast->Is<ast::Void>()) {
|
||||
if (Is<ast::Void>(return_type.ast)) {
|
||||
// crbug.com/tint/677: void has been removed from the language
|
||||
deprecated(tok.source(),
|
||||
"omit '-> void' for functions that do not return a value");
|
||||
|
||||
Reference in New Issue
Block a user