mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 21:47:47 +00:00
[ast] Add helpers for searching a decoration list
This is a commonly used pattern. Change-Id: I698397c93c33db64c53cbe8662186e1976075b80 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/47280 Auto-Submit: James Price <jrprice@google.com> Commit-Queue: James Price <jrprice@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
committed by
Commit Bot service account
parent
c76ec15b45
commit
a12ccb20a0
@@ -310,7 +310,8 @@ bool Resolver::ValidateFunction(const ast::Function* func) {
|
||||
func->source());
|
||||
return false;
|
||||
}
|
||||
} else if (!func->find_decoration<ast::InternalDecoration>()) {
|
||||
} else if (!ast::HasDecoration<ast::InternalDecoration>(
|
||||
func->decorations())) {
|
||||
TINT_ICE(diagnostics_)
|
||||
<< "Function " << builder_->Symbols().NameFor(func->symbol())
|
||||
<< " has no body and does not have the [[internal]] decoration";
|
||||
|
||||
Reference in New Issue
Block a user