aboutsummaryrefslogtreecommitdiff
path: root/gcc/analyzer/program-point.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/analyzer/program-point.cc')
-rw-r--r--gcc/analyzer/program-point.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/analyzer/program-point.cc b/gcc/analyzer/program-point.cc
index 313df9a..bfb1dd4 100644
--- a/gcc/analyzer/program-point.cc
+++ b/gcc/analyzer/program-point.cc
@@ -54,6 +54,7 @@ along with GCC; see the file COPYING3. If not see
#include "analyzer/exploded-graph.h"
#include "analyzer/analysis-plan.h"
#include "analyzer/inlining-iterator.h"
+#include "make-unique.h"
#if ENABLE_ANALYZER
@@ -313,10 +314,10 @@ program_point::dump () const
"stmt_idx": int (only for kind=='PK_BEFORE_STMT',
"call_string": object for the call_string}. */
-json::object *
+std::unique_ptr<json::object>
program_point::to_json () const
{
- json::object *point_obj = new json::object ();
+ auto point_obj = ::make_unique<json::object> ();
point_obj->set_string ("kind", point_kind_to_string (get_kind ()));