================
@@ -596,6 +596,25 @@ void JSONNodeDumper::VisitTLSModelAttr(const TLSModelAttr 
*TA) {
   JOS.attribute("tls_model", TA->getModel());
 }
 
+void JSONNodeDumper::VisitAvailabilityAttr(const AvailabilityAttr *AA) {
+  if (const IdentifierInfo *Platform = AA->getPlatform())
+    JOS.attribute("platform", Platform->getName());
+  if (!AA->getIntroduced().empty())
+    JOS.attribute("introduced", AA->getIntroduced().getAsString());
+  if (!AA->getDeprecated().empty())
+    JOS.attribute("deprecated", AA->getDeprecated().getAsString());
+  if (!AA->getObsoleted().empty())
+    JOS.attribute("obsoleted", AA->getObsoleted().getAsString());
+  attributeOnlyIfTrue("unavailable", AA->getUnavailable());
+  if (!AA->getMessage().empty())
+    JOS.attribute("message", AA->getMessage());
+  if (!AA->getReplacement().empty())
+    JOS.attribute("replacement", AA->getReplacement());
+  attributeOnlyIfTrue("strict", AA->getStrict());
+  if (const IdentifierInfo *Env = AA->getEnvironment())
+    JOS.attribute("environment", Env->getName());
----------------
shafik wrote:

Also this should have a release note.

https://github.com/llvm/llvm-project/pull/179281
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to