Adding verbose setters and getters for diagnostics to make ResourceUtils
code able to print verbose message.

Bug: b/279977244
Test: Verified affected atests pass
Change-Id: Iafbf4cb8a63720c95748a339b1f48dd4213f0eac
diff --git a/tools/aapt2/link/ReferenceLinker.cpp b/tools/aapt2/link/ReferenceLinker.cpp
index 9dadfb2..c69b325 100644
--- a/tools/aapt2/link/ReferenceLinker.cpp
+++ b/tools/aapt2/link/ReferenceLinker.cpp
@@ -164,8 +164,8 @@
 std::unique_ptr<Item> ReferenceLinkerTransformer::ParseValueWithAttribute(
     std::unique_ptr<Item> value, const Attribute* attr) {
   if (RawString* raw_string = ValueCast<RawString>(value.get())) {
-    std::unique_ptr<Item> transformed =
-        ResourceUtils::TryParseItemForAttribute(*raw_string->value, attr);
+    std::unique_ptr<Item> transformed = ResourceUtils::TryParseItemForAttribute(
+        context_->GetDiagnostics(), *raw_string->value, attr);
 
     // If we could not parse as any specific type, try a basic STRING.
     if (!transformed && (attr->type_mask & android::ResTable_map::TYPE_STRING)) {