]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
analyzer: mark epath_finder with DISABLE_COPY_AND_ASSIGN [PR99614]
authorDavid Malcolm <dmalcolm@redhat.com>
Fri, 19 Mar 2021 13:01:57 +0000 (09:01 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Fri, 19 Mar 2021 13:01:57 +0000 (09:01 -0400)
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.

gcc/analyzer/ChangeLog:
PR analyzer/99614
* diagnostic-manager.cc (class epath_finder): Add
DISABLE_COPY_AND_ASSIGN.

gcc/analyzer/diagnostic-manager.cc

index 1a3535cfeb17b0fce661cf04838df77708e78139..a376755b7eea5093fb7ee1af9cf1c2d994bcf392 100644 (file)
@@ -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,