aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorMartin Sebor <msebor@redhat.com>2021-08-31 11:15:21 -0600
committerMartin Sebor <msebor@redhat.com>2021-08-31 11:15:21 -0600
commite4d2305adf4e9d11e396c1c5e5ae6214340cbcc2 (patch)
tree3a10a3da027bbc6875b65d69769465063591a1bc /libcpp
parente45d5b6bf1bcf9fd16c3ecfadb9bde69f890b28d (diff)
downloadgcc-e4d2305adf4e9d11e396c1c5e5ae6214340cbcc2.zip
gcc-e4d2305adf4e9d11e396c1c5e5ae6214340cbcc2.tar.gz
gcc-e4d2305adf4e9d11e396c1c5e5ae6214340cbcc2.tar.bz2
Disable gcc_rich_location copying and assignment.
gcc/cp/ChangeLog: * parser.c (cp_parser_selection_statement): Use direct initialization instead of copy. gcc/ChangeLog: * gcc-rich-location.h (gcc_rich_location): Make ctor explicit. libcpp/ChangeLog: * include/line-map.h (class rich_location): Disable copying and assignment.
Diffstat (limited to 'libcpp')
-rw-r--r--libcpp/include/line-map.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libcpp/include/line-map.h b/libcpp/include/line-map.h
index 7d96417..464494b 100644
--- a/libcpp/include/line-map.h
+++ b/libcpp/include/line-map.h
@@ -1670,6 +1670,12 @@ class rich_location
/* Destructor. */
~rich_location ();
+ /* The class manages the memory pointed to by the elements of
+ the M_FIXIT_HINTS vector and is not meant to be copied or
+ assigned. */
+ rich_location (const rich_location &) = delete;
+ void operator= (const rich_location &) = delete;
+
/* Accessors. */
location_t get_loc () const { return get_loc (0); }
location_t get_loc (unsigned int idx) const;