Simon Marchi
8cb2c7fc2e
gdbsupport: mark array_view::slice with [[nodiscard]]
...
I (almost) had a bug where I did:
buffer.slice (...)
but I meant:
buffer = buffer.slice (...)
The first one does nothing, it creates a new array_view but without
using it, it's useless. Mark the slice methods with [[nodiscard]]
(which is standard C++17) so that error would generate a warning.
I guess that many functions could be marked as nodiscard, essentially
function that is pure (doesn't have side-effects). But this one seems
particularly easy to mis-use.
Change-Id: Ib39a0a65a5728a3cfd68a02ae31635810baeaccb
Approved-By: Tom Tromey <tom@tromey.com >
2023-11-03 14:27:26 -04:00
..
2023-01-01 17:01:16 +04:00
2020-03-05 15:59:22 +01:00
2022-01-13 10:25:45 +00:00
2020-10-31 08:30:57 -04:00
2023-02-14 09:01:18 -07:00
2023-02-14 09:01:18 -07:00
2023-01-01 17:01:16 +04:00
2023-11-03 14:27:26 -04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-09-11 06:15:52 +00:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2021-07-26 12:20:33 +01:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-05 15:18:11 -05:00
2023-09-20 11:45:16 -06:00
2023-06-03 22:43:57 +02:00
2023-08-17 10:41:34 +02:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-06-05 09:59:18 -06:00
2023-04-29 00:35:11 -07:00
2023-03-29 08:57:10 +01:00
2023-10-12 18:23:13 -06:00
2023-01-01 17:01:16 +04:00
2023-10-28 19:25:34 +00:00
2023-10-28 19:25:34 +00:00
2023-10-28 19:25:34 +00:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-08-17 10:41:34 +02:00
2023-01-01 17:01:16 +04:00
2023-06-03 22:43:57 +02:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-02-10 21:04:45 -05:00
2023-02-10 21:04:45 -05:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-03-09 16:32:00 -05:00
2023-06-03 22:43:57 +02:00
2023-01-01 17:01:16 +04:00
2023-05-25 09:48:37 -04:00
2023-05-30 21:49:21 +01:00
2023-05-30 21:49:21 +01:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-06-03 22:43:57 +02:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-03-09 16:32:00 -05:00
2023-01-01 17:01:16 +04:00
2023-10-09 09:59:12 -07:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-09-20 11:45:16 -06:00
2023-05-24 14:53:53 -04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-04-29 00:35:11 -07:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-10-19 10:57:51 -04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-02-24 11:53:03 -07:00
2023-10-28 19:25:34 +00:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-03-09 16:32:00 -05:00
2023-01-01 17:01:16 +04:00
2023-06-03 22:43:57 +02:00
2023-03-09 16:32:00 -05:00
2023-06-03 22:43:57 +02:00
2023-01-01 17:01:16 +04:00
2023-08-17 10:41:34 +02:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-09-15 10:36:15 -06:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-06-03 22:43:57 +02:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-05-25 09:44:52 -04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-06-03 22:43:57 +02:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-11-03 14:25:59 -04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-06-03 22:43:57 +02:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-02-09 07:21:52 -07:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00
2023-08-28 14:18:19 -07:00
2023-01-01 17:01:16 +04:00
2023-01-01 17:01:16 +04:00