cppcheck warns that class epath_finder does dynamic memory allocation, but
is missing a copy constructor and operator=.

This class isn't meant to be copied or assigned, so mark it with
DISABLE_COPY_AND_ASSIGN.

Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r11-7734-g21d09cb732dac5d980ac628eb3aca75c821028a2.

gcc/analyzer/ChangeLog:
        PR analyzer/99614
        * diagnostic-manager.cc (class epath_finder): Add
        DISABLE_COPY_AND_ASSIGN.
---
 gcc/analyzer/diagnostic-manager.cc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gcc/analyzer/diagnostic-manager.cc 
b/gcc/analyzer/diagnostic-manager.cc
index 1a3535cfeb1..a376755b7ee 100644
--- a/gcc/analyzer/diagnostic-manager.cc
+++ b/gcc/analyzer/diagnostic-manager.cc
@@ -95,6 +95,8 @@ public:
                                 feasibility_problem **out_problem);
 
 private:
+  DISABLE_COPY_AND_ASSIGN(epath_finder);
+
   exploded_path *explore_feasible_paths (const exploded_node *target_enode,
                                         const char *desc, unsigned diag_idx);
   bool process_worklist_item (feasible_worklist *worklist,
-- 
2.26.2

Reply via email to