tint: Support @diagnostic on loop and loop body

Bug: tint:1809
Change-Id: Ib3ccfd823f9cccb67bebbf04927d54f193a4e281
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/124321
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
diff --git a/src/tint/program_builder.h b/src/tint/program_builder.h
index 31f566b..bcfaf6e 100644
--- a/src/tint/program_builder.h
+++ b/src/tint/program_builder.h
@@ -3264,20 +3264,26 @@
     /// @param source the source information
     /// @param body the loop body
     /// @param continuing the optional continuing block
+    /// @param attributes optional attributes
     /// @returns the loop statement pointer
-    const ast::LoopStatement* Loop(const Source& source,
-                                   const ast::BlockStatement* body,
-                                   const ast::BlockStatement* continuing = nullptr) {
-        return create<ast::LoopStatement>(source, body, continuing);
+    const ast::LoopStatement* Loop(
+        const Source& source,
+        const ast::BlockStatement* body,
+        const ast::BlockStatement* continuing = nullptr,
+        utils::VectorRef<const ast::Attribute*> attributes = utils::Empty) {
+        return create<ast::LoopStatement>(source, body, continuing, std::move(attributes));
     }
 
     /// Creates a ast::LoopStatement with input body and optional continuing
     /// @param body the loop body
     /// @param continuing the optional continuing block
+    /// @param attributes optional attributes
     /// @returns the loop statement pointer
-    const ast::LoopStatement* Loop(const ast::BlockStatement* body,
-                                   const ast::BlockStatement* continuing = nullptr) {
-        return create<ast::LoopStatement>(body, continuing);
+    const ast::LoopStatement* Loop(
+        const ast::BlockStatement* body,
+        const ast::BlockStatement* continuing = nullptr,
+        utils::VectorRef<const ast::Attribute*> attributes = utils::Empty) {
+        return create<ast::LoopStatement>(body, continuing, std::move(attributes));
     }
 
     /// Creates a ast::ForLoopStatement with input body and optional initializer, condition,