From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id CIsEHVedXGU/qgsAWB0awg (envelope-from ) for ; Tue, 21 Nov 2023 07:06:47 -0500 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=0UKoteYP; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 729601E0D2; Tue, 21 Nov 2023 07:06:47 -0500 (EST) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 62DF81E091 for ; Tue, 21 Nov 2023 07:06:45 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 138ED3858004 for ; Tue, 21 Nov 2023 12:06:45 +0000 (GMT) Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2062.outbound.protection.outlook.com [40.107.212.62]) by sourceware.org (Postfix) with ESMTPS id 786B83858289 for ; Tue, 21 Nov 2023 12:05:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 786B83858289 Authentication-Results: sourceware.org; dmarc=fail (p=quarantine dis=none) header.from=amd.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=amd.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 786B83858289 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.212.62 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1700568360; cv=pass; b=Y5NpdlGBQj7846WIDlp+8kH6/4N3J6k3OmpNIlsM1C7khV7hqNRbD+adNmhHLU1AFj3S3rTHI1WLyWX16quM5kplOIcNgKSDdKeo0JDyufT0sDjnY/hZprf1Muiqa0i2LpTKLQ1iaMxLE/ekVLIIkSWbkNQ+AulClslpT+ehHvM= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1700568360; c=relaxed/simple; bh=iXsetJtj1hxO0H3fNuLC7Af6EwLFiD6/7jufJpz0cHY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=FV8rnqaZOB3jnp+t8utqqyjI4KChM6A0atBN29G/3zq2o4rq1n76vXMAvYkNLBvu1PCFgTHWh53LKg5W+Ww1QxC6LgyeGn02wVR7tgpl3uESC+NIzVuMIrolFHFanmkmuX/tDlswDWEFgqvfJXRGBdY2SToYMiJqzN/cGyL6oxY= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T9qJf6tmtrPdMeGMOVOKd+kFg2kjXa22FQs8dC9Te9UCe5xjWFpnV2fmFTsfTXVPh+Sj36PN6wHYJImEFkQtczHj4zEWjSDDGZbLG+2HLytmG+bJbhlzRdcgwnVwDOURpi+FwbQc5jTDpaUKZnafFtajysDoIfiVBRMpHWl4vbTxEP8xhMtIlAq3vetvhuJyPvmh878KPPCvW56uq547qDtBEbwJurHP1sXp32ADwmlwZw+JFMNgm+ReIF4BoKUvGsJrVx010BLmFA6Iw7cIe9lgZtv4kpQRJ5S0rHB4bgxWgV+TbuXSyKlQfB4zUNfcBOa9OW2SxYA8JuivPNJeVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=e5tD/3k8oaL/LlQIpEmetSBpoQsEZuA8NFiyWi4Ljds=; b=Kljy36TAdIK3iwzsY1DAQecyJ0gFYKsqUxd4L+DC8hepWW+oHUV75PidIo1n14m0VUWTW2LRFhWQ3WlmgS7l71itGOEjd+Whw6eF0ziJYqryQ/g3psJtKaHKNiclk787yatjvXkUg43v44buQqNUD0m3he5v+JzmP2U/W7jgYfkahXBLv5qW9EpfM4v7LxA0ApWrMIqlCyMcwecxDK28KFooyAriihVAQHFUrvSf9AkCLPE5y5kgH8T+sVVJgII1GA1S9LqdJ/7G6JGRYhH7/YVdrC9IeL9IE0YQjfwBlJQyqOvLBbn2N2R8favKwKA7D0161fyntGqgpTPA7mNkKQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=sourceware.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=e5tD/3k8oaL/LlQIpEmetSBpoQsEZuA8NFiyWi4Ljds=; b=0UKoteYPVqXhDZWn+JKfM0+9RmyW0g4EC7HMXU61oTvDSJn7GuI2NFxv4cDI0vuVxr1cPuLkdHlIx288VCOykHdOa3Yxi5hlo7j5Z4nn7GEBfakT5O3T0J5kUSUN8kqqsCGBeBROo9CPTVpUxeIFRoFxXQx8Cu1mpb5sRhFlanQ= Received: from BL1PR13CA0094.namprd13.prod.outlook.com (2603:10b6:208:2b9::9) by CH3PR12MB8753.namprd12.prod.outlook.com (2603:10b6:610:178::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.28; Tue, 21 Nov 2023 12:05:54 +0000 Received: from MN1PEPF0000F0E3.namprd04.prod.outlook.com (2603:10b6:208:2b9:cafe::78) by BL1PR13CA0094.outlook.office365.com (2603:10b6:208:2b9::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.16 via Frontend Transport; Tue, 21 Nov 2023 12:05:54 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by MN1PEPF0000F0E3.mail.protection.outlook.com (10.167.242.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7025.12 via Frontend Transport; Tue, 21 Nov 2023 12:05:54 +0000 Received: from hpe6u-23.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Tue, 21 Nov 2023 06:05:53 -0600 From: Lancelot Six To: CC: , , Lancelot Six Subject: [COMMITTED PATCH v2 9/9] gdb: Use initializers in lambda captures unconditionally Date: Tue, 21 Nov 2023 12:05:00 +0000 Message-ID: <20231121120500.1394523-10-lancelot.six@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231028204821.fp5hh7bahrmrnpjl@hpe6u-23> References: <20231028204821.fp5hh7bahrmrnpjl@hpe6u-23> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN1PEPF0000F0E3:EE_|CH3PR12MB8753:EE_ X-MS-Office365-Filtering-Correlation-Id: b4221154-8aa9-4ecd-2de1-08dbea8a36b6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ROpwEpPnHlfJ02ygdGGW/9WB6+M7ekBDDnkWeAZrsDuC6BRrQPEM0VQWiuP88DtxDTMrZAGE7FY/nwfiFPPL6SBJCGz3G+CDYIwVxeG6Vd7vFnJwlZPLkJq5YzZ74yRlghmKVLYErXnUKRyWrtNP9vkHHifCYAGBJpBUN80qVxd3pQUJwo9obsW6oDL8uSOA5TlGEpB4wbpjHx8gZMhp30em6cnuj1QOMR/h2K56ZJHnma5RL/0hvg9hCQjv8VU+SKgSfY9LsXidR34ikBfjvumsI0C5I4UKQ/CKPJxrZdAR49aH5GVWeV7vs/OyC+S/AiRZ3mQrVx1mmz9ToB4aBkHDre8ctc9kKfVktQ5FYDu9McCysPyvrq2f506Cl0nsFvhac/TWrc3fScueBqFsTt5fx60RL6CdE4b3m8nL36iNTo6angQF/UHeOXFu4+r3L6R3Bxx10fwPnhDKY70N3lNjmzp7XI1l/Mk9c9ZKPRN2efDoRhJnyyga7CoDMY9Ch0GM9RvFAbbIHn2uInP/lsaRD1Y/4UsBoG2Q8iDuCg/+7uUGrp5Dq76/ZxYi1sj56Dd4sSYrEVS6LaM2FeLERuL9u/BvxW+5erveuHra3+Eg2VaZ+dlWmsfIJySvymDwsBHwr1YxedNxwar7q19rdBbq3i9+bgXK+YStwLZI6x4Ords0xaBiY7b+drdgBDw3iMrc4DyIG14vREng++YzibvRK1uhRpbkY9CB8IC69Sc3RH0+eUyTs7WFLpMrb0/kMuFZLiG9qLKVxAPNCEOlDg== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(4636009)(376002)(346002)(396003)(136003)(39860400002)(230922051799003)(451199024)(64100799003)(186009)(82310400011)(1800799012)(36840700001)(46966006)(40470700004)(40460700003)(83380400001)(426003)(336012)(26005)(16526019)(1076003)(47076005)(36860700001)(8676002)(4326008)(8936002)(44832011)(2906002)(5660300002)(41300700001)(478600001)(6666004)(70586007)(7696005)(70206006)(6916009)(54906003)(316002)(36756003)(81166007)(86362001)(82740400003)(356005)(2616005)(40480700001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Nov 2023 12:05:54.6883 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b4221154-8aa9-4ecd-2de1-08dbea8a36b6 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: MN1PEPF0000F0E3.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB8753 X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Initializers in lambda captures were introduced in C++14, and conditionally used in gdb/cp-support.c and gdb/dwarf2/cooked-index.c. Since C++17 is now required by GDB, use this feature unconditionally. Change-Id: I87a3d567941e5c71217538fa75c952e4d421fa1d Approved-By: Tom Tromey Approved-By: Pedro Alves --- gdb/cp-support.c | 8 +------- gdb/dwarf2/cooked-index.c | 7 +------ 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/gdb/cp-support.c b/gdb/cp-support.c index 834c4774755..cb169444d2a 100644 --- a/gdb/cp-support.c +++ b/gdb/cp-support.c @@ -1657,13 +1657,7 @@ gdb_demangle (const char *name, int options) we might be in a background thread. Instead, arrange for the reporting to happen on the main thread. */ std::string copy = name; - run_on_main_thread ([ -#if __cplusplus >= 201402L - =, copy = std::move (copy) -#else - = -#endif - ] () + run_on_main_thread ([=, copy = std::move (copy)] () { report_failed_demangle (copy.c_str (), core_dump_allowed, crash_signal); diff --git a/gdb/dwarf2/cooked-index.c b/gdb/dwarf2/cooked-index.c index 7c4af3a1681..10631dccecf 100644 --- a/gdb/dwarf2/cooked-index.c +++ b/gdb/dwarf2/cooked-index.c @@ -466,12 +466,7 @@ cooked_index::start_writing_index (dwarf2_per_bfd *per_bfd) started, because it may call 'wait'. */ m_write_future = gdb::thread_pool::g_thread_pool->post_task ([this, per_bfd, -#if __cplusplus >= 201402L - ctx = std::move (ctx) -#else - ctx -#endif - ] () + ctx = std::move (ctx)] () { maybe_write_index (per_bfd, ctx); }); -- 2.34.1