[PATCH 03/11] [analyzer] Fixup diagnostic_path for "json::number" to "json::integer_number"
David Malcolm
dmalcolm@redhat.com
Wed Nov 20 21:12:00 GMT 2019
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(-)
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;
--
1.8.5.3
More information about the Gcc-patches
mailing list