aboutsummaryrefslogtreecommitdiff
path: root/gcc/analyzer/diagnostic-manager.h
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2022-11-03 13:47:01 -0400
committerDavid Malcolm <dmalcolm@redhat.com>2022-11-03 13:47:01 -0400
commite031c5a17a33f19ccae1e0e7972c97d2b2eb8250 (patch)
treed0fbbfc10c53d3123782d8fff72061e7d2c4b3ea /gcc/analyzer/diagnostic-manager.h
parentca5ff10546e612eff3d5e225b62b44ddf656cfbf (diff)
downloadgcc-e031c5a17a33f19ccae1e0e7972c97d2b2eb8250.zip
gcc-e031c5a17a33f19ccae1e0e7972c97d2b2eb8250.tar.gz
gcc-e031c5a17a33f19ccae1e0e7972c97d2b2eb8250.tar.bz2
analyzer: use std::unique_ptr for feasibility_problems and exploded_path
gcc/analyzer/ChangeLog: * diagnostic-manager.cc: Include "make-unique.h". Use std::unique_ptr for feasibility_problems and exploded_path. Delete explicit saved_diagnostic dtor. * diagnostic-manager.h: Likewise. * engine.cc: Likewise. * exploded-graph.h: Likewise. * feasible-graph.cc: Likewise. * feasible-graph.h: Likewise. Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diffstat (limited to 'gcc/analyzer/diagnostic-manager.h')
-rw-r--r--gcc/analyzer/diagnostic-manager.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/analyzer/diagnostic-manager.h b/gcc/analyzer/diagnostic-manager.h
index c87f215..4862cf4 100644
--- a/gcc/analyzer/diagnostic-manager.h
+++ b/gcc/analyzer/diagnostic-manager.h
@@ -38,7 +38,6 @@ public:
state_machine::state_t state,
std::unique_ptr<pending_diagnostic> d,
unsigned idx);
- ~saved_diagnostic ();
bool operator== (const saved_diagnostic &other) const;
@@ -51,11 +50,11 @@ public:
const feasibility_problem *get_feasibility_problem () const
{
- return m_problem;
+ return m_problem.get ();
}
bool calc_best_epath (epath_finder *pf);
- const exploded_path *get_best_epath () const { return m_best_epath; }
+ const exploded_path *get_best_epath () const { return m_best_epath.get (); }
unsigned get_epath_length () const;
void add_duplicate (saved_diagnostic *other);
@@ -83,8 +82,8 @@ private:
DISABLE_COPY_AND_ASSIGN (saved_diagnostic);
unsigned m_idx;
- exploded_path *m_best_epath; // owned
- feasibility_problem *m_problem; // owned
+ std::unique_ptr<exploded_path> m_best_epath;
+ std::unique_ptr<feasibility_problem> m_problem;
auto_vec<const saved_diagnostic *> m_duplicates;
auto_delete_vec <pending_note> m_notes;