From f0756e347ad786ed3ec22b1b8ab3122a55b9fea5 Mon Sep 17 00:00:00 2001 From: Ben Clayton Date: Thu, 29 Apr 2021 20:57:55 +0000 Subject: [PATCH] resolver: Improve the ICE msg about nodes Include the pointer - helps debugging Change-Id: I50058095710eb528446bbd8d8e3069dd657c75c8 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/49521 Kokoro: Kokoro Commit-Queue: Antonio Maiorano Reviewed-by: Antonio Maiorano Auto-Submit: Ben Clayton --- src/resolver/resolver.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/resolver/resolver.cc b/src/resolver/resolver.cc index c4588cd8e2..3e2101457d 100644 --- a/src/resolver/resolver.cc +++ b/src/resolver/resolver.cc @@ -266,7 +266,8 @@ bool Resolver::ResolveInternal() { TINT_ICE(diagnostics_) << "AST node '" << node->TypeInfo().name << "' was not reached by the resolver\n" << "At: " << node->source() << "\n" - << "Content: " << builder_->str(node); + << "Content: " << builder_->str(node) << "\n" + << "Pointer: " << node; } } @@ -2774,7 +2775,9 @@ void Resolver::Mark(const ast::Node* node) { TINT_ICE(diagnostics_) << "AST node '" << node->TypeInfo().name << "' was encountered twice in the same AST of a Program\n" - << "At: " << node->source(); + << "At: " << node->source() << "\n" + << "Content: " << builder_->str(node) << "\n" + << "Pointer: " << node; } Resolver::VariableInfo::VariableInfo(const ast::Variable* decl,