From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) by sourceware.org (Postfix) with ESMTPS id 8715E385DC33 for ; Mon, 14 Sep 2020 21:31:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8715E385DC33 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=alves.ped@gmail.com Received: by mail-wm1-f47.google.com with SMTP id x23so1387840wmi.3 for ; Mon, 14 Sep 2020 14:31:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=S3ziJshqzxLs+nBU0d0UplQCvrxvJ3VLLfoeUxy5uFs=; b=RhlLP9FssxKlFqByg89VNGWPBuX8Qji0WLh4SCiJWxyiM4okYWuvg/mVvYyFoloasW jxiCF+hrf9kMpQUh5n4+mPvay7QGZ7dDpVMdllZrm0pY9vpj+lzBeP8qbMGr8rbqeowv j39HC68JshlP0+AZt3ZmPK0WS/tuJJBeKRzIRRFgd2Y2yhIrdJm09f0eicJDfKVsu6or CMv2tYXnhTTozeGAh727knF4SvZfDsVmecSmpCHIw9jdrUKEFHV0Gam5aMBhXUFZmbA1 r4eXP44GGUKOwSKv1Dq739jN1mAg4X6BS11IUf/MGU75+del2tTgO7bxoEFI8//bQKl2 k/DQ== X-Gm-Message-State: AOAM5314/szDpj+SVWw9phGT8ynQUbbgpeJZVFGeTITuwLr6Igz7Ftiz 1QhHGBNwQ1vrmMiAAyvLHhbpedsudH7DpQ== X-Google-Smtp-Source: ABdhPJyateU9/94AXLsoz0ZK4HLYx3O2LKGmMHrjQqqnLJjxigK51P5LymbvZLqJeNmKw2cPNeD1HQ== X-Received: by 2002:a1c:6487:: with SMTP id y129mr1370794wmb.90.1600119074933; Mon, 14 Sep 2020 14:31:14 -0700 (PDT) Received: from localhost ([2001:8a0:f905:5600:eefd:c63:53e0:3e8a]) by smtp.gmail.com with ESMTPSA id i11sm23284817wre.32.2020.09.14.14.31.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Sep 2020 14:31:13 -0700 (PDT) From: Pedro Alves To: gdb-patches@sourceware.org Subject: [pushed v2 0/4] Rewrite enum_flags, add unit tests, fix problems Date: Mon, 14 Sep 2020 22:31:08 +0100 Message-Id: <20200914213112.19593-1-pedro@palves.net> X-Mailer: git-send-email 2.14.5 X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Sep 2020 21:31:18 -0000 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