From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ms9.webland.ch (ms9.webland.ch [92.43.217.109]) by sourceware.org (Postfix) with ESMTPS id B3BAC3833796 for ; Wed, 22 Jun 2022 15:38:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B3BAC3833796 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=indel.ch Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=ms9.webland.ch Received: from macserver.private ([77.58.17.252]) by ms9.webland.ch (12.3.0 build 2 x64) with ASMTP id 01202206221738358377 for ; Wed, 22 Jun 2022 17:38:35 +0200 Received: from localhost (localhost [127.0.0.1]) by macserver.private (Postfix) with ESMTP id AF06C4C9FDF0; Wed, 22 Jun 2022 17:38:34 +0200 (CEST) X-Virus-Scanned: amavisd-new at indel.ch Received: from macserver.private ([127.0.0.1]) by localhost (macserver.private [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id F3NjGg+0lMnu; Wed, 22 Jun 2022 17:38:34 +0200 (CEST) Received: from localhost.localdomain (unknown [192.168.1.109]) by macserver.private (Postfix) with ESMTP id 8B0E84C9FDE9; Wed, 22 Jun 2022 17:38:34 +0200 (CEST) From: Christian Walther To: gdb-patches@sourceware.org Cc: Christian Walther Subject: [PATCH v2 2/2] Move a comment to a less confusing place Date: Wed, 22 Jun 2022 17:37:40 +0200 Message-Id: <20220622153740.176590-2-walther@indel.ch> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220622153740.176590-1-walther@indel.ch> References: <09601b2b-bb3c-a38a-3bd9-ae06f1c98513@redhat.com> <20220622153740.176590-1-walther@indel.ch> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CTCH: RefID="str=0001.0A782F1E.62B3377C.0001,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0"; Spam="Unknown"; VOD="Unknown" X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, 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.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jun 2022 15:38:41 -0000 Make it clearer that this comment (from 2024f65) does not apply to the call to check_typedef further down, which is not on the return value of get_target_type. --- gdb/c-varobj.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gdb/c-varobj.c b/gdb/c-varobj.c index 64c3a9ebf1c..acda879bfeb 100644 --- a/gdb/c-varobj.c +++ b/gdb/c-varobj.c @@ -86,6 +86,9 @@ adjust_value_for_child_access (struct value **value, if ((*type)->code () == TYPE_CODE_PTR) { struct type *target_type = get_target_type (*type); + /* The 'get_target_type' function calls check_typedef on + result, so we can immediately check type code. No + need to call check_typedef here. */ if (target_type->code () == TYPE_CODE_STRUCT || target_type->code () == TYPE_CODE_UNION) { @@ -108,10 +111,6 @@ adjust_value_for_child_access (struct value **value, } } - /* The 'get_target_type' function calls check_typedef on - result, so we can immediately check type code. No - need to call check_typedef here. */ - /* Access a real type of the value (if necessary and possible). */ if (value && *value && lookup_actual_type) { -- 2.25.1