upb: fix most of the ClangTidy warnings in util/required_fields.?

PiperOrigin-RevId: 567333328
diff --git a/upb/upb/util/BUILD b/upb/upb/util/BUILD
index dc9f4ec..46b8521 100644
--- a/upb/upb/util/BUILD
+++ b/upb/upb/util/BUILD
@@ -97,7 +97,9 @@
     hdrs = ["required_fields.h"],
     visibility = ["//visibility:public"],
     deps = [
+        "//upb:base",
         "//upb:collections",
+        "//upb:message_types",
         "//upb:port",
         "//upb:reflection",
     ],
diff --git a/upb/upb/util/required_fields.c b/upb/upb/util/required_fields.c
index d0e0557..7059786 100644
--- a/upb/upb/util/required_fields.c
+++ b/upb/upb/util/required_fields.c
@@ -30,11 +30,21 @@
 
 #include "upb/upb/util/required_fields.h"
 
+#include <assert.h>
 #include <inttypes.h>
+#include <setjmp.h>
 #include <stdarg.h>
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
 
+#include "upb/upb/base/descriptor_constants.h"
+#include "upb/upb/collections/array.h"
 #include "upb/upb/collections/map.h"
+#include "upb/upb/message/types.h"
 #include "upb/upb/port/vsnprintf_compat.h"
+#include "upb/upb/reflection/def.h"
 #include "upb/upb/reflection/message.h"
 
 // Must be last.
diff --git a/upb/upb/util/required_fields.h b/upb/upb/util/required_fields.h
index c7aa5d5..e8c3763 100644
--- a/upb/upb/util/required_fields.h
+++ b/upb/upb/util/required_fields.h
@@ -31,6 +31,8 @@
 #ifndef UPB_UTIL_REQUIRED_FIELDS_H_
 #define UPB_UTIL_REQUIRED_FIELDS_H_
 
+#include <stddef.h>
+
 #include "upb/upb/reflection/def.h"
 #include "upb/upb/reflection/message.h"