From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7862) id 49269385415B; Mon, 31 Oct 2022 12:44:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 49269385415B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667220285; bh=Yvz0BxdAcybygK7ehOWMPR4OKEPUYM2EFix/3FGbntA=; h=From:To:Subject:Date:From; b=Hh6XfKsHUU7OAORo9U7UyfmyAbjnS+/+YKc5z63Q4BXcPGbSfonzq5NQfCfNPmSQX jIYFBq4YjhUm2bRPLqg2e5sibWOI2/ju/ErjZtgbM/kbxs9oC/k7WD1GOEgboCijZe 2NTP/npnjbm0eXqYz/NHj8CZvx5V9jtiyVSHom0U= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Bruno Larsen To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb/testsuite: add XFAIL to gdb.cp/ptype-flags.exp when using clang X-Act-Checkin: binutils-gdb X-Git-Author: Bruno Larsen X-Git-Refname: refs/heads/master X-Git-Oldrev: de1fbe7889eb4f363b979c14735b8fd51131621b X-Git-Newrev: 2ce385da88704170ba6922743c437177eef2c09d Message-Id: <20221031124445.49269385415B@sourceware.org> Date: Mon, 31 Oct 2022 12:44:45 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D2ce385da8870= 4170ba6922743c437177eef2c09d commit 2ce385da88704170ba6922743c437177eef2c09d Author: Bruno Larsen Date: Fri Sep 9 20:34:27 2022 +0200 gdb/testsuite: add XFAIL to gdb.cp/ptype-flags.exp when using clang =20 When running gdb.cp/ptype-flags.exp using Clang, we get an unexpected failure when printing the type of a class with an internal typedef. This happens because Clang doesn't add accessibility information for typedefs inside classes (see https://github.com/llvm/llvm-project/issues/57608 for more info). To help with Clang testing, an XFAIL was added to this test. Diff: --- gdb/testsuite/gdb.cp/ptype-flags.exp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gdb/testsuite/gdb.cp/ptype-flags.exp b/gdb/testsuite/gdb.cp/pt= ype-flags.exp index f88c83e03ce..371a2a5f128 100644 --- a/gdb/testsuite/gdb.cp/ptype-flags.exp +++ b/gdb/testsuite/gdb.cp/ptype-flags.exp @@ -30,11 +30,18 @@ if ![runto_main] then { return } =20 +if {[test_compiler_info {clang-*-*} c++]} { + set using_clang true +} else { + set using_clang false +} + gdb_test_no_output "set language c++" "" gdb_test_no_output "set width 0" "" =20 proc do_check_holder {name {flags ""} {show_typedefs 1} {show_methods 1} {raw 0}} { + global using_clang =20 set contents { { base "public Base" } @@ -49,6 +56,11 @@ proc do_check_holder {name {flags ""} {show_typedefs 1} = {show_methods 1} } =20 if {$show_typedefs} { + # Clang does not add accessibility information for typedefs: + # https://github.com/llvm/llvm-project/issues/57608 + if {$using_clang} { + setup_xfail "clang 57608" *-*-* + } lappend contents { typedef public "typedef Simple > Z;" } }