From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7BCD4385E44A; Fri, 18 Feb 2022 22:19:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7BCD4385E44A From: "msebor at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug c++/28901] unable to resolve function overloads involving inheritance Date: Fri, 18 Feb 2022 22:19:37 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: c++ X-Bugzilla-Version: 11.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: msebor at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: tromey at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Feb 2022 22:19:37 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28901 --- Comment #5 from Martin Sebor --- Here you go: (gdb) p (llvm::Value*)CI $1 =3D (llvm::Value *) 0x986a2a0 (gdb) p errs()=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 Overloaded function instance llvm::errs() # of parms 0 ...Badness of length : {0, 0} Overload resolution champion is 0, ambiguous? 0 $2 =3D (llvm::raw_fd_ostream &) @0x979fbc0: { =3D { =3D { _vptr$raw_ostream =3D 0x96d2698 ,= =20 Kind =3D llvm::raw_ostream::OStreamKind::OK_OStream, OutBufStart =3D = 0x0,=20 OutBufEnd =3D 0x0, OutBufCur =3D 0x0, ColorEnabled =3D true,=20 TiedStream =3D 0x0,=20 BufferMode =3D llvm::raw_ostream::BufferKind::Unbuffered,=20 static BLACK =3D llvm::raw_ostream::Colors::BLACK,=20 static RED =3D llvm::raw_ostream::Colors::RED,=20 static GREEN =3D llvm::raw_ostream::Colors::GREEN,=20 static YELLOW =3D llvm::raw_ostream::Colors::YELLOW,=20 static BLUE =3D llvm::raw_ostream::Colors::BLUE,=20 static MAGENTA =3D llvm::raw_ostream::Colors::MAGENTA,=20 static CYAN =3D llvm::raw_ostream::Colors::CYAN,=20 static WHITE =3D llvm::raw_ostream::Colors::WHITE,=20 static SAVEDCOLOR =3D llvm::raw_ostream::Colors::SAVEDCOLOR,=20 static RESET =3D llvm::raw_ostream::Colors::RESET}, }= ,=20 FD =3D 2, ShouldClose =3D false, SupportsSeeking =3D false,=20 IsRegularFile =3D false, HasColors =3D {Storage =3D {{empty =3D 0 '\000',= =20 value =3D false}, hasVal =3D false}}, EC =3D {_M_value =3D 0,=20 _M_cat =3D 0x7ffff7eb3160 <(anonymous namespace)::system_category_insta= nce>},=20 pos =3D 207} (gdb) p $1->print($2, false) Overloaded method instance llvm::Value::print(llvm::raw_ostream&, bool) con= st, # of parms 3 ...Badness of length : {0, 0} ...Badness of arg 1 : {1, 1} ...Badness of arg 2 : {100, 0} ...Badness of arg 3 : {0, 0} Overload resolution champion is 0, ambiguous? 0 Overloaded method instance llvm::Value::print(llvm::raw_ostream&, llvm::ModuleSlotTracker&, bool) const, # of parms 4 ...Badness of length : {100, 0} ...Badness of arg 1 : {1, 1} ...Badness of arg 2 : {100, 0} ...Badness of arg 3 : {100, 0} Overload resolution champion is 0, ambiguous? 0 Cannot resolve method llvm::Value::print to any overloaded instance --=20 You are receiving this mail because: You are on the CC list for the bug.=