[pushed,v2,0/4] Rewrite enum_flags, add unit tests, fix problems

Message ID 20200914213112.19593-1-pedro@palves.net
Headers show
Series
  • Rewrite enum_flags, add unit tests, fix problems
Related show

Message

Pedro Alves Sept. 14, 2020, 9:31 p.m.
I've addressed the review comments made to v1 of this series,
originally posted at:

  https://sourceware.org/pipermail/gdb-patches/2020-August/171392.html

and merged it.

Changes in v2:

Patch #1 includes Andrew's bits, with a tweak -- I'm calling the new
method type::instance_flags() instead of type::get_instance_flags() to
follow the same scheme of the other getters/setters.  That required
renaming the type::instance_flags data field.  And since we now have
the methods, I got rid of SET_TYPE_INSTANCE_FLAGS and just used the
method directly throughout.

Patch #2 is new, to address a comment from Tromey.

Patch #3 is unmodified.

Patch #4 includes the fix that disables the rvalue ref compound
assignemnt operators.

Pedro Alves (4):
  Use type_instance_flags more throughout
  Rename address_space_int_to_name/address_space_name_to_int
  Rewrite valid-expr.h's internals in terms of the detection idiom
    (C++17/N4502)
  Rewrite enum_flags, add unit tests, fix problems

 gdb/ChangeLog                        |  88 ++++++
 gdbsupport/ChangeLog                 |  30 ++
 gdb/Makefile.in                      |   1 +
 gdb/avr-tdep.c                       |  15 +-
 gdb/btrace.c                         |   4 +-
 gdb/c-typeprint.c                    |   5 +-
 gdb/compile/compile-c-types.c        |   3 +-
 gdb/compile/compile-cplus-symbols.c  |   4 +-
 gdb/compile/compile-cplus-types.c    |  10 +-
 gdb/d-lang.c                         |  11 +-
 gdb/dwarf2/read.c                    |   7 +-
 gdb/eval.c                           |   2 +-
 gdb/ft32-tdep.c                      |  16 +-
 gdb/gdbarch.c                        |   8 +-
 gdb/gdbarch.h                        |  16 +-
 gdb/gdbarch.sh                       |  10 +-
 gdb/gdbtypes.c                       |  82 ++---
 gdb/gdbtypes.h                       |  26 +-
 gdb/go-exp.y                         |   2 +-
 gdb/record-btrace.c                  |  10 +-
 gdb/s390-tdep.c                      |  13 +-
 gdb/stabsread.c                      |   2 +-
 gdb/type-stack.c                     |   9 +-
 gdb/type-stack.h                     |  10 +-
 gdb/unittests/enum-flags-selftests.c | 586 +++++++++++++++++++++++++++++++++++
 gdbsupport/enum-flags.h              | 370 +++++++++++++++++-----
 gdbsupport/traits.h                  |  67 ++++
 gdbsupport/valid-expr.h              |  35 ++-
 28 files changed, 1227 insertions(+), 215 deletions(-)
 create mode 100644 gdb/unittests/enum-flags-selftests.c


base-commit: 27087b7f6ce8c6d304b149df2484436d97e6334b
-- 
2.14.5