[02/11,analyzer] Fixup metadata-handling for "json::number" to "json::integer_number"
diff mbox series

Message ID 1574284430-8776-3-git-send-email-dmalcolm@redhat.com
State New
Headers show
Series
  • Static analysis v2
Related show

Commit Message

David Malcolm Nov. 20, 2019, 9:13 p.m. UTC
r277284 eliminated json::number in favor of json::float_number and
json::integer_number.  Update the diagnostic metadata code accordingly.

gcc/ChangeLog:
	* diagnostic-format-json.cc (json_from_metadata): Use
	json::integer_number.
---
 gcc/diagnostic-format-json.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/gcc/diagnostic-format-json.cc b/gcc/diagnostic-format-json.cc
index 24a08c0..f73d09b 100644
--- a/gcc/diagnostic-format-json.cc
+++ b/gcc/diagnostic-format-json.cc
@@ -112,7 +112,8 @@  json_from_metadata (const diagnostic_metadata *metadata)
   json::object *metadata_obj = new json::object ();
 
   if (metadata->get_cwe ())
-    metadata_obj->set ("cwe", new json::number (metadata->get_cwe ()));
+    metadata_obj->set ("cwe",
+		       new json::integer_number (metadata->get_cwe ()));
 
   return metadata_obj;
 }