mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-15 08:06:19 +00:00
ast: Fix nullptr deref in Variable::info_to_str
Varaibles can infer types now, in which case the type_ field is null. Fixed: chromium:1221120 Change-Id: I0cb2a6a2e8128c56625f48940cf73cf4cadb22ce Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/55252 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Antonio Maiorano <amaiorano@google.com> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
committed by
Tint LUCI CQ
parent
def7313523
commit
4d94eee072
@@ -85,7 +85,10 @@ void Variable::info_to_str(const sem::Info& sem,
|
||||
make_indent(out, indent);
|
||||
out << declared_access_ << std::endl;
|
||||
make_indent(out, indent);
|
||||
out << type_->type_name() << std::endl;
|
||||
if (type_) {
|
||||
out << type_->type_name();
|
||||
}
|
||||
out << std::endl;
|
||||
}
|
||||
|
||||
void Variable::constructor_to_str(const sem::Info& sem,
|
||||
|
||||
Reference in New Issue
Block a user