aboutsummaryrefslogtreecommitdiff
path: root/gcc/analyzer/sm.cc
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2024-07-24 18:07:52 -0400
committerDavid Malcolm <dmalcolm@redhat.com>2024-07-24 18:07:52 -0400
commit78d1906c982ad49a0742a7bc1624762159ca165c (patch)
treed29b109428605b88c99a3047e12d1d13c1fe4656 /gcc/analyzer/sm.cc
parent3f14878fbfcd69b316e2be195c3377a750ad6031 (diff)
downloadgcc-78d1906c982ad49a0742a7bc1624762159ca165c.zip
gcc-78d1906c982ad49a0742a7bc1624762159ca165c.tar.gz
gcc-78d1906c982ad49a0742a7bc1624762159ca165c.tar.bz2
analyzer: reduce use of naked "new" for json dumps
No functional change intended. gcc/analyzer/ChangeLog: * call-string.cc (call_string::to_json): Avoid naked "new". * constraint-manager.cc (bounded_range::set_json_attr): Likewise. (equiv_class::to_json): Likewise. (constraint::to_json): Likewise. (bounded_ranges_constraint::to_json): Likewise. * diagnostic-manager.cc (saved_diagnostic::to_json): Likewise. (saved_diagnostic::maybe_add_sarif_properties): Likewise. * engine.cc (exploded_node::to_json): Likewise. (exploded_edge::to_json): Likewise. * program-point.cc (program_point::to_json): Likewise. * program-state.cc (program_state::to_json): Likewise. * sm.cc (state_machine::to_json): Likewise. * store.cc (binding_cluster::to_json): Likewise. (store::to_json): Likewise. * supergraph.cc (supernode::to_json): Likewise. (superedge::to_json): Likewise. Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diffstat (limited to 'gcc/analyzer/sm.cc')
-rw-r--r--gcc/analyzer/sm.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/analyzer/sm.cc b/gcc/analyzer/sm.cc
index f23a94b..f8b21b8 100644
--- a/gcc/analyzer/sm.cc
+++ b/gcc/analyzer/sm.cc
@@ -156,7 +156,7 @@ state_machine::to_json () const
{
json::object *sm_obj = new json::object ();
- sm_obj->set ("name", new json::string (m_name));
+ sm_obj->set_string ("name", m_name);
{
json::array *states_arr = new json::array ();
unsigned i;