[03/11,analyzer] Fixup diagnostic_path for "json::number" to "json::integer_number"
diff mbox series

Message ID 1574284430-8776-4-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_path code accordingly.

gcc/ChangeLog:
	* tree-diagnostic-path.cc (default_tree_make_json_for_path): Fix
	overlong line.  Use json::integer_number.
---
 gcc/tree-diagnostic-path.cc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Patch
diff mbox series

diff --git a/gcc/tree-diagnostic-path.cc b/gcc/tree-diagnostic-path.cc
index d044152..abb418d 100644
--- a/gcc/tree-diagnostic-path.cc
+++ b/gcc/tree-diagnostic-path.cc
@@ -484,7 +484,8 @@  default_tree_diagnostic_path_printer (diagnostic_context *context,
    doesn't have access to trees (for m_fndecl).  */
 
 json::value *
-default_tree_make_json_for_path (diagnostic_context *, const diagnostic_path *path)
+default_tree_make_json_for_path (diagnostic_context *,
+				 const diagnostic_path *path)
 {
   json::array *path_array = new json::array ();
   for (unsigned i = 0; i < path->num_events (); i++)
@@ -504,7 +505,8 @@  default_tree_make_json_for_path (diagnostic_context *, const diagnostic_path *pa
 	    = identifier_to_locale (lang_hooks.decl_printable_name (fndecl, 2));
 	  event_obj->set ("function", new json::string (function));
 	}
-      event_obj->set ("depth", new json::number (event.get_stack_depth ()));
+      event_obj->set ("depth",
+		      new json::integer_number (event.get_stack_depth ()));
       path_array->append (event_obj);
     }
   return path_array;