From patchwork Mon Dec 21 01:31:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artemiy Volkov X-Patchwork-Id: 10086 Received: (qmail 98619 invoked by alias); 20 Dec 2015 22:35:55 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 98411 invoked by uid 89); 20 Dec 2015 22:35:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL, BAYES_50, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=marker1, whatis, editor, Rational X-HELO: mail-lb0-f194.google.com Received: from mail-lb0-f194.google.com (HELO mail-lb0-f194.google.com) (209.85.217.194) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Sun, 20 Dec 2015 22:35:31 +0000 Received: by mail-lb0-f194.google.com with SMTP id w4so4560661lbv.0 for ; Sun, 20 Dec 2015 14:35:29 -0800 (PST) X-Received: by 10.112.151.67 with SMTP id uo3mr4033012lbb.43.1450650926648; Sun, 20 Dec 2015 14:35:26 -0800 (PST) Received: from localhost.localdomain ([37.204.1.155]) by smtp.gmail.com with ESMTPSA id m75sm4420435lfg.15.2015.12.20.14.35.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 20 Dec 2015 14:35:25 -0800 (PST) From: Artemiy Volkov To: gdb-patches@sourceware.org Cc: Artemiy Volkov Subject: [PATCH 11/11] [PR gdb/14441] gdb: testsuite: add rvalue reference tests Date: Mon, 21 Dec 2015 04:31:21 +0300 Message-Id: <1450661481-31178-12-git-send-email-artemiyv@acm.org> In-Reply-To: <1450661481-31178-1-git-send-email-artemiyv@acm.org> References: <1450661481-31178-1-git-send-email-artemiyv@acm.org> X-IsSubscribed: yes This patch adds tests for the initial rvalue reference support patchset. Files to change were selected among the most important files which test regular C++ references and the added tests are practically mirrored regular references tests. Tested are printing of rvalue reference types and values, rvalue reference parameters in function overloading, demangling of function names containing rvalue reference parameters, casts to rvalue reference types, and application of the sizeof operator to rvalue reference types and values. All the changed files have been obviously set to compile with -std=c++11, and in some cases this required altering function names which coincided with keywords introduced in the new standard. testsuite/ChangeLog: 2015-12-20 Artemiy Volkov * gdb.cp/casts.cc (main): Change decltype() function name. Add rvalue reference type variables. * gdb.cp/casts.exp: Compile with -std=c++11. Add rvalue reference cast tests. * gdb.cp/cpsizeof.cc: Add rvalue reference type variables. * gdb.cp/cpsizeof.exp: Compile with -std=c++11. Add rvalue reference sizeof tests. * gdb.cp/demangle.exp: Add rvalue reference demangle tests. * gdb.cp/overload.cc (int main): Add a ctor and some methods with rvalue reference parameters. * gdb.cp/overload.exp: Compile with -std=c++11. Add rvalue reference overloading tests. * gdb.cp/ref-params.cc (int f1): New function taking rvalue reference parameter. (int f2): Likewise. (int mf1): Likewise. (int mf2): Likewise. * gdb.cp/ref-params.exp: Compile with -std=c++11. Add rvalue reference parameter printing tests. * gdb.cp/ref-types.cc (int main2): Add rvalue reference type variables. * gdb.cp/ref-types.exp: Compile with -std=c++11. Add rvalue reference type printing tests. --- gdb/testsuite/gdb.cp/casts.cc | 8 +- gdb/testsuite/gdb.cp/casts.exp | 34 ++++++- gdb/testsuite/gdb.cp/cpsizeof.cc | 4 + gdb/testsuite/gdb.cp/cpsizeof.exp | 2 +- gdb/testsuite/gdb.cp/demangle.exp | 172 +++++++++++++++++++++++++++++++++++- gdb/testsuite/gdb.cp/overload.cc | 9 ++ gdb/testsuite/gdb.cp/overload.exp | 14 ++- gdb/testsuite/gdb.cp/ref-params.cc | 29 +++++- gdb/testsuite/gdb.cp/ref-params.exp | 20 ++++- gdb/testsuite/gdb.cp/ref-types.cc | 24 +++++ gdb/testsuite/gdb.cp/ref-types.exp | 136 +++++++++++++++++++++++++++- 11 files changed, 439 insertions(+), 13 deletions(-) diff --git a/gdb/testsuite/gdb.cp/casts.cc b/gdb/testsuite/gdb.cp/casts.cc index 43f112f..d15fed1 100644 --- a/gdb/testsuite/gdb.cp/casts.cc +++ b/gdb/testsuite/gdb.cp/casts.cc @@ -1,3 +1,5 @@ +#include + struct A { int a; @@ -37,7 +39,7 @@ struct DoublyDerived : public VirtuallyDerived, // Confuse a simpler approach. double -decltype(int x) +decl_type(int x) { return x + 2.0; } @@ -49,6 +51,8 @@ main (int argc, char **argv) B *b = (B *) a; A &ar = *b; B &br = (B&)ar; + A &&arr = std::move(A(42)); + B &&brr = std::move(B(42, 1729)); Derived derived; DoublyDerived doublyderived; @@ -56,7 +60,7 @@ main (int argc, char **argv) Alpha *ad = &derived; Alpha *add = &doublyderived; - double y = decltype(2); + double y = decl_type(2); return 0; /* breakpoint spot: casts.exp: 1 */ } diff --git a/gdb/testsuite/gdb.cp/casts.exp b/gdb/testsuite/gdb.cp/casts.exp index c202cb2..556b7c0 100644 --- a/gdb/testsuite/gdb.cp/casts.exp +++ b/gdb/testsuite/gdb.cp/casts.exp @@ -33,7 +33,7 @@ if [get_compiler_info "c++"] { return -1 } -if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} { +if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++ additional_flags="-std=c++11"}]} { return -1 } @@ -86,6 +86,18 @@ gdb_test "print (B &) ar" ".* = .B.* { = {a = 42}, b = 1729}" \ gdb_test "print br" ".* = .B.* { = {a = 42}, b = 1729}" \ "let compiler cast base class reference to derived class reference" +# Casting Rvalue References. +# Check upcasting. +gdb_test "print (A &&) br" ".* = .A &&.* {a = 42}" \ + "cast derived class rvalue reference to base class rvalue reference" + +# Check downcasting. +gdb_test "print (B &&) ar" ".* = .B.* { = {a = 42}, b = 1729}" \ + "cast base class rvalue reference to derived class rvalue reference" + +# Check compiler casting +gdb_test "print br" ".* = .B.* { = {a = 42}, b = 1729}" \ + "let compiler cast base class rvalue reference to derived class rvalue reference" # A few basic tests of "new" casts. @@ -101,6 +113,9 @@ gdb_test "print static_cast (b)" " = \\(A \\*\\) $hex" \ gdb_test "print static_cast (*b)" " = \\(A \\&\\) @$hex: {a = 42}" \ "static_cast to reference type" +gdb_test "print static_cast (*b)" " = \\(A \\&\\&\\) @$hex: {a = 42}" \ + "static_cast to rvalue reference type" + gdb_test "print reinterpret_cast (b)" " = \\(A \\*\\) $hex" \ "basic test of reinterpret_cast" @@ -110,13 +125,16 @@ gdb_test "print reinterpret_cast (b)" "Invalid reinterpret_cast" \ gdb_test "print reinterpret_cast (*b)" " = \\(A \\&\\) @$hex: {a = 42}" \ "reinterpret_cast to reference type" +gdb_test "print reinterpret_cast (*b)" " = \\(A \\&\\&\\) @$hex: {a = 42}" \ + "reinterpret_cast to rvalue reference type" + # Test that keyword shadowing works. -gdb_test "whatis decltype(5)" " = double" +gdb_test "whatis decl_type(5)" " = double" # Basic tests using typeof. -foreach opname {__typeof__ __typeof __decltype} { +foreach opname {__typeof__ __typeof decltype} { gdb_test "print (${opname}(a)) (b)" " = \\(A \\*\\) $hex" \ "old-style cast using $opname" @@ -127,7 +145,7 @@ foreach opname {__typeof__ __typeof __decltype} { "reinterpret_cast using $opname" } -gdb_test "whatis __decltype(*a)" "type = A \\&" +gdb_test "whatis decltype(*a)" "type = A \\&" # Tests of dynamic_cast. @@ -153,6 +171,10 @@ gdb_test "print dynamic_cast (derived)" \ " = \\(Alpha \\&\\) @$nonzero_hex: {.* = ${nonzero_hex}( )?}" \ "dynamic_cast simple upcast to reference" +gdb_test "print dynamic_cast (derived)" \ + " = \\(Alpha \\&\\&\\) @$nonzero_hex: {.* = ${nonzero_hex}( )?}" \ + "dynamic_cast simple upcast to rvalue reference" + gdb_test "print dynamic_cast (ad)" \ " = \\(Derived \\*\\) ${nonzero_hex}( )?" \ "dynamic_cast simple downcast" @@ -169,6 +191,10 @@ gdb_test "print dynamic_cast (*ad)" \ "dynamic_cast failed" \ "dynamic_cast to reference to non-existing base" +gdb_test "print dynamic_cast (*ad)" \ + "dynamic_cast failed" \ + "dynamic_cast to rvalue reference to non-existing base" + gdb_test "print dynamic_cast (add)" \ " = \\(DoublyDerived \\*\\) ${nonzero_hex}( )?" \ "dynamic_cast unique downcast" diff --git a/gdb/testsuite/gdb.cp/cpsizeof.cc b/gdb/testsuite/gdb.cp/cpsizeof.cc index cac9397..d44d002 100644 --- a/gdb/testsuite/gdb.cp/cpsizeof.cc +++ b/gdb/testsuite/gdb.cp/cpsizeof.cc @@ -15,6 +15,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +#include + struct Class { int a; @@ -44,8 +46,10 @@ typedef Enum e12[12]; #define T(N) \ N N ## obj; \ N& N ## _ref = N ## obj; \ + N&& N ## _rref = std::move(N ## obj); \ N* N ## p = &(N ## obj); \ N*& N ## p_ref = N ## p; \ + N*&& N ## p_rref = std::move(N ## p); \ int size_ ## N = sizeof (N ## _ref); \ int size_ ## N ## p = sizeof (N ## p_ref); \ diff --git a/gdb/testsuite/gdb.cp/cpsizeof.exp b/gdb/testsuite/gdb.cp/cpsizeof.exp index 37bc440..ac0e5e1 100644 --- a/gdb/testsuite/gdb.cp/cpsizeof.exp +++ b/gdb/testsuite/gdb.cp/cpsizeof.exp @@ -18,7 +18,7 @@ standard_testfile .cc if {[skip_cplus_tests]} { continue } -if {[prepare_for_testing ${testfile}.exp $testfile $srcfile {debug c++}] } { +if {[prepare_for_testing ${testfile}.exp $testfile $srcfile {debug c++ additional_flags="-std=c++11"}] } { return -1 } diff --git a/gdb/testsuite/gdb.cp/demangle.exp b/gdb/testsuite/gdb.cp/demangle.exp index 078f4b4..8c0e1ba 100644 --- a/gdb/testsuite/gdb.cp/demangle.exp +++ b/gdb/testsuite/gdb.cp/demangle.exp @@ -123,20 +123,27 @@ proc test_gnu_style_demangling {} { test_demangling "gnu: Append__15NameChooserViewPCc" \ "NameChooserView::Append\[(\]+(const char|char const) \[*\]+\[)\]+" test_demangling_exact "gnu: ArrowheadIntersects__9ArrowLineP9ArrowheadR6BoxObjP7Graphic" "ArrowLine::ArrowheadIntersects(Arrowhead *, BoxObj &, Graphic *)" + test_demangling_exact "gnu: ArrowheadIntersects__9ArrowLineP9ArrowheadO6BoxObjP7Graphic" "ArrowLine::ArrowheadIntersects(Arrowhead *, BoxObj &&, Graphic *)" test_demangling_exact "gnu: AtEnd__13ivRubberGroup" "ivRubberGroup::AtEnd(void)" test_demangling_exact "gnu: BgFilter__9ivTSolverP12ivInteractor" "ivTSolver::BgFilter(ivInteractor *)" test_demangling "gnu: BitPatterntoa__FRC10BitPatternccc" \ "BitPatterntoa\[(\]+(const BitPattern|BitPattern const) &, char, char, char\[)\]+" + test_demangling "gnu: BitPatterntoa__FOC10BitPatternccc" \ + "BitPatterntoa\[(\]+(const BitPattern|BitPattern const) &&, char, char, char\[)\]+" test_demangling_exact "gnu: Check__6UArrayi" "UArray::Check(int)" test_demangling_exact "gnu: CoreConstDecls__8TextCodeR7ostream" "TextCode::CoreConstDecls(ostream &)" + test_demangling_exact "gnu: CoreConstDecls__8TextCodeO7ostream" "TextCode::CoreConstDecls(ostream &&)" test_demangling_exact "gnu: Detach__8StateVarP12StateVarView" "StateVar::Detach(StateVarView *)" test_demangling_exact "gnu: Done__9ComponentG8Iterator" "Component::Done(Iterator)" test_demangling "gnu: DrawDestinationTransformedImage__FP7_XImageiiT0iiUlUiiiUiUlUlP4_XGCRC13ivTransformeriiii" \ "DrawDestinationTransformedImage\[(\]+_XImage \[*\]+, int, int, _XImage \[*\]+, int, int, unsigned long, unsigned int, int, int, unsigned int, unsigned long, unsigned long, _XGC \[*\]+, (const ivTransformer|ivTransformer const) &, int, int, int, int\[)\]+" + test_demangling "gnu: DrawDestinationTransformedImage__FP7_XImageiiT0iiUlUiiiUiUlUlP4_XGCOC13ivTransformeriiii" \ + "DrawDestinationTransformedImage\[(\]+_XImage \[*\]+, int, int, _XImage \[*\]+, int, int, unsigned long, unsigned int, int, int, unsigned int, unsigned long, unsigned long, _XGC \[*\]+, (const ivTransformer|ivTransformer const) &&, int, int, int, int\[)\]+" test_demangling "gnu: Edit__12StringEditorPCcii" \ "StringEditor::Edit\[(\]+(const char|char const) \[*\]+, int, int\[)\]+" test_demangling_exact "gnu: Effect__11RelateManipR7ivEvent" "RelateManip::Effect(ivEvent &)" + test_demangling_exact "gnu: Effect__11RelateManipO7ivEvent" "RelateManip::Effect(ivEvent &&)" test_demangling "gnu: FilterName__FPCc" \ "FilterName\[(\]+(const char|char const) \[*\]+\[)\]+" test_demangling "gnu: Filter__6PSTextPCci" \ @@ -144,10 +151,13 @@ proc test_gnu_style_demangling {} { test_demangling "gnu: FindColor__7CatalogPCciii" \ "Catalog::FindColor\[(\]+(const char|char const) \[*\]+, int, int, int\[)\]+" test_demangling_exact "gnu: FindFixed__FRP4CNetP4CNet" "FindFixed(CNet *&, CNet *)" + test_demangling_exact "gnu: FindFixed__FOP4CNetP4CNet" "FindFixed(CNet *&&, CNet *)" test_demangling "gnu: FindFont__7CatalogPCcN21" \ "Catalog::FindFont\[(\]+(const char|char const) \[*\]+, (const char|char const) \[*\]+, (const char|char const) \[*\]+\[)\]+" test_demangling_exact "gnu: Fix48_abort__FR8twolongs" "Fix48_abort(twolongs &)" + test_demangling_exact "gnu: Fix48_abort__FO8twolongs" "Fix48_abort(twolongs &&)" test_demangling_exact "gnu: GetBarInfo__15iv2_6_VScrollerP13ivPerspectiveRiT2" "iv2_6_VScroller::GetBarInfo(ivPerspective *, int &, int &)" + test_demangling_exact "gnu: GetBarInfo__15iv2_6_VScrollerP13ivPerspectiveOiT2" "iv2_6_VScroller::GetBarInfo(ivPerspective *, int &&, int &&)" test_demangling_exact "gnu: GetBgColor__C9ivPainter" "ivPainter::GetBgColor(void) const" test_demangling "gnu: Iisdouble__FPC6IntRep" \ @@ -159,10 +169,13 @@ proc test_gnu_style_demangling {} { test_demangling_exact "gnu: InsertToplevel__7ivWorldP12ivInteractorT1iiUi" "ivWorld::InsertToplevel(ivInteractor *, ivInteractor *, int, int, unsigned int)" test_demangling "gnu: IsADirectory__FPCcR4stat" \ "IsADirectory\[(\]+(const char|char const) \[*\]+, stat &\[)\]+" + test_demangling "gnu: IsADirectory__FPCcO4stat" \ + "IsADirectory\[(\]+(const char|char const) \[*\]+, stat &&\[)\]+" test_demangling_exact "gnu: IsAGroup__FP11GraphicViewP11GraphicComp" "IsAGroup(GraphicView *, GraphicComp *)" test_demangling_exact "gnu: IsA__10ButtonCodeUl" "ButtonCode::IsA(unsigned long)" test_demangling_exact "gnu: ReadName__FR7istreamPc" "ReadName(istream &, char *)" + test_demangling_exact "gnu: ReadName__FO7istreamPc" "ReadName(istream &&, char *)" test_demangling_exact "gnu: Redraw__13StringBrowseriiii" "StringBrowser::Redraw(int, int, int, int)" test_demangling_exact "gnu: Rotate__13ivTransformerf" "ivTransformer::Rotate(float)" test_demangling_exact "gnu: Rotated__C13ivTransformerf" "ivTransformer::Rotated(float) const" @@ -173,10 +186,15 @@ proc test_gnu_style_demangling {} { test_demangling_exact "gnu: Set__5DFacePcii" "DFace::Set(char *, int, int)" test_demangling_exact "gnu: VConvert__9ivTSolverP12ivInteractorRP8TElementT2" "ivTSolver::VConvert(ivInteractor *, TElement *&, TElement *&)" + test_demangling_exact "gnu: VConvert__9ivTSolverP12ivInteractorOP8TElementT2" "ivTSolver::VConvert(ivInteractor *, TElement *&&, TElement *&&)" test_demangling_exact "gnu: VConvert__9ivTSolverP7ivTGlueRP8TElement" "ivTSolver::VConvert(ivTGlue *, TElement *&)" + test_demangling_exact "gnu: VConvert__9ivTSolverP7ivTGlueOP8TElement" "ivTSolver::VConvert(ivTGlue *, TElement *&&)" test_demangling_exact "gnu: VOrder__9ivTSolverUiRP12ivInteractorT2" "ivTSolver::VOrder(unsigned int, ivInteractor *&, ivInteractor *&)" + test_demangling_exact "gnu: VOrder__9ivTSolverUiOP12ivInteractorT2" "ivTSolver::VOrder(unsigned int, ivInteractor *&&, ivInteractor *&&)" test_demangling "gnu: Valid__7CatalogPCcRP4Tool" \ "Catalog::Valid\[(\]+(const char|char const) \[*\]+, Tool \[*\]+&\[)\]+" + test_demangling "gnu: Valid__7CatalogPCcOP4Tool" \ + "Catalog::Valid\[(\]+(const char|char const) \[*\]+, Tool \[*\]+&&\[)\]+" test_demangling_exact "gnu: _10PageButton\$__both" "PageButton::__both" test_demangling_exact "gnu: _3RNG\$singleMantissa" "RNG::singleMantissa" test_demangling_exact "gnu: _5IComp\$_release" "IComp::_release" @@ -206,16 +224,21 @@ proc test_gnu_style_demangling {} { "iv2_6_MenuItem::iv2_6_MenuItem\[(\]+int, (const char|char const) \[*\]+, ivInteractor \[*\]+\[)\]+" test_demangling_exact "gnu: __20DisplayList_IteratorR11DisplayList" "DisplayList_Iterator::DisplayList_Iterator(DisplayList &)" + test_demangling_exact "gnu: __20DisplayList_IteratorO11DisplayList" "DisplayList_Iterator::DisplayList_Iterator(DisplayList &&)" test_demangling_exact "gnu: __3fooRT0" "foo::foo(foo &)" + test_demangling_exact "gnu: __3fooOT0" "foo::foo(foo &&)" test_demangling_exact "gnu: __3fooiN31" "foo::foo(int, int, int, int)" test_demangling "gnu: __3fooiPCc" \ "foo::foo\[(\]+int, (const char|char const) \[*\]+\[)\]+" test_demangling_exact "gnu: __3fooiRT0iT2iT2" "foo::foo(int, foo &, int, foo &, int, foo &)" + test_demangling_exact "gnu: __3fooiOT0iT2iT2" "foo::foo(int, foo &&, int, foo &&, int, foo &&)" test_demangling "gnu: __6GetOptiPPcPCc" \ "GetOpt::GetOpt\[(\]+int, char \[*\]+\[*\]+, (const char|char const) \[*\]+\[)\]+" test_demangling_exact "gnu: __6KeyMapPT0" "KeyMap::KeyMap(KeyMap *)" test_demangling "gnu: __7ivWorldPCcRiPPcPC12ivOptionDescPC14ivPropertyData" \ "ivWorld::ivWorld\[(\]+(const char|char const) \[*\]+, int &, char \[*\]+\[*\]+, (const ivOptionDesc|ivOptionDesc const) \[*\]+, (const ivPropertyData|ivPropertyData const) \[*\]+\[)\]+" + test_demangling "gnu: __7ivWorldPCcOiPPcPC12ivOptionDescPC14ivPropertyData" \ + "ivWorld::ivWorld\[(\]+(const char|char const) \[*\]+, int &&, char \[*\]+\[*\]+, (const ivOptionDesc|ivOptionDesc const) \[*\]+, (const ivPropertyData|ivPropertyData const) \[*\]+\[)\]+" test_demangling "gnu: __7procbufPCci" \ "procbuf::procbuf\[(\]+(const char|char const) \[*\]+, int\[)\]+" test_demangling_exact "gnu: __8ArrowCmdP6EditorUiUi" "ArrowCmd::ArrowCmd(Editor *, unsigned int, unsigned int)" @@ -265,10 +288,16 @@ proc test_gnu_style_demangling {} { test_demangling_exact "gnu: __ne__3fooRT0" "foo::operator!=(foo &)" test_demangling "gnu: __ne__FRC7ComplexT0" \ "operator!=\[(\]+(const Complex|Complex const) &, (const Complex|Complex const) &\[)\]+" + test_demangling "gnu: __ne__FOC7ComplexT0" \ + "operator!=\[(\]+(const Complex|Complex const) &&, (const Complex|Complex const) &&\[)\]+" test_demangling "gnu: __ne__FRC7Complexd" \ "operator!=\[(\]+(const Complex|Complex const) &, double\[)\]+" + test_demangling "gnu: __ne__FOC7Complexd" \ + "operator!=\[(\]+(const Complex|Complex const) &&, double\[)\]+" test_demangling "gnu: __ne__FRC9SubStringRC6String" \ "operator!=\[(\]+(const SubString|SubString const) &, (const String|String const) &\[)\]+" + test_demangling "gnu: __ne__FOC9SubStringOC6String" \ + "operator!=\[(\]+(const SubString|SubString const) &&, (const String|String const) &&\[)\]+" test_demangling_exact "gnu: __nt__3foo" "foo::operator!(void)" test_demangling_exact "gnu: __nw__3fooi" "foo::operator new(int)" test_demangling_exact "gnu: __oo__3fooRT0" "foo::operator||(foo &)" @@ -283,6 +312,8 @@ proc test_gnu_style_demangling {} { test_demangling "gnu: __vc__3fooRT0" "foo::operator\\\[\\\]\\(foo &\\)" test_demangling "gnu: _gsub__6StringRC5RegexPCci" \ "String::_gsub\[(\]+(const Regex|Regex const) &, (const char|char const) \[*\]+, int\[)\]+" + test_demangling "gnu: _gsub__6StringOC5RegexPCci" \ + "String::_gsub\[(\]+(const Regex|Regex const) &&, (const char|char const) \[*\]+, int\[)\]+" test_demangling_exact "gnu: _new_Fix__FUs" "_new_Fix(unsigned short)" # gcc 2.4.5 (and earlier) style virtual tables. We want to continue to @@ -295,6 +326,8 @@ proc test_gnu_style_demangling {} { test_demangling_exact "gnu: append__7ivGlyphPT0" "ivGlyph::append(ivGlyph *)" test_demangling "gnu: arg__FRC7Complex" \ "arg\[(\]+(const Complex|Complex const) &\[)\]+" + test_demangling "gnu: arg__FOC7Complex" \ + "arg\[(\]+(const Complex|Complex const) &&\[)\]+" test_demangling_exact "gnu: clearok__FP7_win_sti" "clearok(_win_st *, int)" test_demangling_exact "gnu: complexfunc2__FPFPc_i" "complexfunc2(int (*)(char *))" @@ -305,35 +338,55 @@ proc test_gnu_style_demangling {} { test_demangling_exact "gnu: complexfunc7__FPFPFPc_i_PFl_i" "complexfunc7(int (*(*)(int (*)(char *)))(long))" test_demangling "gnu: contains__C9BitStringRC10BitPattern" \ "BitString::contains\[(\]+(const BitPattern|BitPattern const) &\[)\]+ const" + test_demangling "gnu: contains__C9BitStringOC10BitPattern" \ + "BitString::contains\[(\]+(const BitPattern|BitPattern const) &&\[)\]+ const" test_demangling "gnu: contains__C9BitStringRC12BitSubStringi" \ "BitString::contains\[(\]+(const BitSubString|BitSubString const) &, int\[)\]+ const" + test_demangling "gnu: contains__C9BitStringOC12BitSubStringi" \ + "BitString::contains\[(\]+(const BitSubString|BitSubString const) &&, int\[)\]+ const" test_demangling "gnu: contains__C9BitStringRT0" \ "BitString::contains\[(\]+(const BitString|BitString const) &\[)\]+ const" + test_demangling "gnu: contains__C9BitStringOT0" \ + "BitString::contains\[(\]+(const BitString|BitString const) &&\[)\]+ const" test_demangling "gnu: div__FPC6IntRepT0P6IntRep" \ "div\[(\]+(const IntRep|IntRep const) \[*\]+, (const IntRep|IntRep const) \[*\]+, IntRep \[*\]+\[)\]+" test_demangling "gnu: div__FPC6IntReplP6IntRep" \ "div\[(\]+(const IntRep|IntRep const) \[*\]+, long, IntRep \[*\]+\[)\]+" test_demangling "gnu: div__FRC8RationalT0R8Rational" \ "div\[(\]+(const Rational|Rational const) &, (const Rational|Rational const) &, Rational &\[)\]+" + test_demangling "gnu: div__FOC8RationalT0O8Rational" \ + "div\[(\]+(const Rational|Rational const) &&, (const Rational|Rational const) &&, Rational &&\[)\]+" test_demangling "gnu: divide__FRC7IntegerT0R7IntegerT2" \ "divide\[(\]+(const Integer|Integer const) &, (const Integer|Integer const) &, Integer &, Integer &\[)\]+" + test_demangling "gnu: divide__FOC7IntegerT0O7IntegerT2" \ + "divide\[(\]+(const Integer|Integer const) &&, (const Integer|Integer const) &&, Integer &&, Integer &&\[)\]+" test_demangling "gnu: divide__FRC7IntegerlR7IntegerRl" \ "divide\[(\]+(const Integer|Integer const) &, long, Integer &, long &\[)\]+" + test_demangling "gnu: divide__FOC7IntegerlO7IntegerOl" \ + "divide\[(\]+(const Integer|Integer const) &&, long, Integer &&, long &&\[)\]+" test_demangling "gnu: enable__14DocumentViewerPCcUi" \ "DocumentViewer::enable\[(\]+(const char|char const) \[*\]+, unsigned int\[)\]+" test_demangling_exact "gnu: foo__FiN30" "foo(int, int, int, int)" test_demangling_exact "gnu: foo__FiR3fooiT1iT1" "foo(int, foo &, int, foo &, int, foo &)" + test_demangling_exact "gnu: foo__FiO3fooiT1iT1" "foo(int, foo &&, int, foo &&, int, foo &&)" test_demangling_exact "gnu: foo___3barl" "bar::foo_(long)" test_demangling_exact "gnu: insert__15ivClippingStacklRP8_XRegion" "ivClippingStack::insert(long, _XRegion *&)" + test_demangling_exact "gnu: insert__15ivClippingStacklOP8_XRegion" "ivClippingStack::insert(long, _XRegion *&&)" test_demangling_exact "gnu: insert__16ChooserInfo_ListlR11ChooserInfo" "ChooserInfo_List::insert(long, ChooserInfo &)" + test_demangling_exact "gnu: insert__16ChooserInfo_ListlO11ChooserInfo" "ChooserInfo_List::insert(long, ChooserInfo &&)" test_demangling_exact "gnu: insert__17FontFamilyRepListlRP15ivFontFamilyRep" "FontFamilyRepList::insert(long, ivFontFamilyRep *&)" + test_demangling_exact "gnu: insert__17FontFamilyRepListlOP15ivFontFamilyRep" "FontFamilyRepList::insert(long, ivFontFamilyRep *&&)" test_demangling_exact "gnu: leaveok__FP7_win_stc" "leaveok(_win_st *, char)" test_demangling_exact "gnu: left_mover__C7ivMFKitP12ivAdjustableP7ivStyle" "ivMFKit::left_mover(ivAdjustable *, ivStyle *) const" test_demangling "gnu: matches__C9BitStringRC10BitPatterni" \ "BitString::matches\[(\]+(const BitPattern|BitPattern const) &, int\[)\]+ const" + test_demangling "gnu: matches__C9BitStringOC10BitPatterni" \ + "BitString::matches\[(\]+(const BitPattern|BitPattern const) &&, int\[)\]+ const" test_demangling "gnu: matches__C9SubStringRC5Regex" \ "SubString::matches\[(\]+(const Regex|Regex const) &\[)\]+ const" + test_demangling "gnu: matches__C9SubStringOC5Regex" \ + "SubString::matches\[(\]+(const Regex|Regex const) &&\[)\]+ const" test_demangling_exact "gnu: overload1arg__FSc" "overload1arg(signed char)" test_demangling_exact "gnu: overload1arg__FUc" "overload1arg(unsigned char)" @@ -361,12 +414,18 @@ proc test_gnu_style_demangling {} { test_demangling_exact "gnu: overloadargs__Fiiiiiiiiiii" "overloadargs(int, int, int, int, int, int, int, int, int, int, int)" test_demangling "gnu: pick__13ivCompositionP8ivCanvasRC12ivAllocationiR5ivHit" \ "ivComposition::pick\[(\]+ivCanvas \[*\]+, (const ivAllocation|ivAllocation const) &, int, ivHit &\[)\]+" + test_demangling "gnu: pick__13ivCompositionP8ivCanvasOC12ivAllocationiO5ivHit" \ + "ivComposition::pick\[(\]+ivCanvas \[*\]+, (const ivAllocation|ivAllocation const) &&, int, ivHit &&\[)\]+" test_demangling "gnu: pointer__C11ivHScrollerRC7ivEventRC12ivAllocation" \ "ivHScroller::pointer\[(\]+(const ivEvent|ivEvent const) &, (const ivAllocation|ivAllocation const) &\[)\]+ const" + test_demangling "gnu: pointer__C11ivHScrollerOC7ivEventOC12ivAllocation" \ + "ivHScroller::pointer\[(\]+(const ivEvent|ivEvent const) &&, (const ivAllocation|ivAllocation const) &&\[)\]+ const" test_demangling_exact "gnu: poke__8ivRasterUlUlffff" "ivRaster::poke(unsigned long, unsigned long, float, float, float, float)" test_demangling_exact "gnu: polar__Fdd" "polar(double, double)" test_demangling "gnu: read__10osStdInputRPCc" \ "osStdInput::read\[(\]+(const char|char const) \[*\]+&\[)\]+" + test_demangling "gnu: read__10osStdInputOPCc" \ + "osStdInput::read\[(\]+(const char|char const) \[*\]+&&\[)\]+" test_demangling_exact "gnu: scale__13ivTransformerff" "ivTransformer::scale(float, float)" test_demangling "gnu: scanw__12CursesWindowPCce" \ @@ -379,6 +438,8 @@ proc test_gnu_style_demangling {} { test_demangling_exact "gnu: test__C6BitSetii" "BitSet::test(int, int) const" test_demangling "gnu: testbit__FRC7Integerl" \ "testbit\[(\]+(const Integer|Integer const) &, long\[)\]+" + test_demangling "gnu: testbit__FOC7Integerl" \ + "testbit\[(\]+(const Integer|Integer const) &&, long\[)\]+" test_demangling_exact "gnu: text_source__8Documentl" "Document::text_source(long)" test_demangling_exact "gnu: variance__6Erlangd" "Erlang::variance(double)" test_demangling "gnu: vform__8iostreamPCcPc" \ @@ -436,27 +497,41 @@ proc test_gnu_style_demangling {} { test_demangling_exact "gnu: __Q2t4List1Z10VHDLEntity3PixRCQ2t4List1Z10VHDLEntity3Pix" \ "List::Pix::Pix(List::Pix const &)" + test_demangling_exact "gnu: __Q2t4List1Z10VHDLEntity3PixOCQ2t4List1Z10VHDLEntity3Pix" \ + "List::Pix::Pix(List::Pix const &&)" test_demangling_exact "gnu: __Q2t4List1Z10VHDLEntity7elementRC10VHDLEntityPT0" \ "List::element::element(VHDLEntity const &, List::element *)" + test_demangling_exact "gnu: __Q2t4List1Z10VHDLEntity7elementOC10VHDLEntityPT0" \ + "List::element::element(VHDLEntity const &&, List::element *)" test_demangling_exact "gnu: __Q2t4List1Z10VHDLEntity7elementRCQ2t4List1Z10VHDLEntity7element" \ "List::element::element(List::element const &)" + test_demangling_exact "gnu: __Q2t4List1Z10VHDLEntity7elementOCQ2t4List1Z10VHDLEntity7element" \ + "List::element::element(List::element const &&)" test_demangling_exact "gnu: __cl__C11VHDLLibraryGt4PixX3Z11VHDLLibraryZ14VHDLLibraryRepZt4List1Z10VHDLEntity" \ "VHDLLibrary::operator()(PixX >) const" test_demangling_exact "gnu: __cl__Ct4List1Z10VHDLEntityRCQ2t4List1Z10VHDLEntity3Pix" \ "List::operator()(List::Pix const &) const" + test_demangling_exact "gnu: __cl__Ct4List1Z10VHDLEntityOCQ2t4List1Z10VHDLEntity3Pix" \ + "List::operator()(List::Pix const &&) const" test_demangling_exact "gnu: __ne__FPvRCQ2t4List1Z10VHDLEntity3Pix" \ "operator!=(void *, List::Pix const &)" + test_demangling_exact "gnu: __ne__FPvOCQ2t4List1Z10VHDLEntity3Pix" \ + "operator!=(void *, List::Pix const &&)" test_demangling_exact "gnu: __ne__FPvRCt4PixX3Z11VHDLLibraryZ14VHDLLibraryRepZt4List1Z10VHDLEntity" \ "operator!=(void *, PixX > const &)" + test_demangling_exact "gnu: __ne__FPvOCt4PixX3Z11VHDLLibraryZ14VHDLLibraryRepZt4List1Z10VHDLEntity" \ + "operator!=(void *, PixX > const &&)" test_demangling_exact "gnu: __t4List1Z10VHDLEntityRCt4List1Z10VHDLEntity" \ "List::List(List const &)" + test_demangling_exact "gnu: __t4List1Z10VHDLEntityOCt4List1Z10VHDLEntity" \ + "List::List(List const &&)" test_demangling_exact "gnu: __t4PixX3Z11VHDLLibraryZ14VHDLLibraryRepZt4List1Z10VHDLEntity" \ "PixX >::PixX(void)" @@ -465,13 +540,19 @@ proc test_gnu_style_demangling {} { "PixX >::PixX(VHDLLibraryRep *, List::Pix)" test_demangling_exact "gnu: __t4PixX3Z11VHDLLibraryZ14VHDLLibraryRepZt4List1Z10VHDLEntityRCt4PixX3Z11VHDLLibraryZ14VHDLLibraryRepZt4List1Z10VHDLEntity" \ - "PixX >::PixX(PixX > const &)" + "PixX >::PixX(PixX > const &)" + test_demangling_exact "gnu: __t4PixX3Z11VHDLLibraryZ14VHDLLibraryRepZt4List1Z10VHDLEntityOCt4PixX3Z11VHDLLibraryZ14VHDLLibraryRepZt4List1Z10VHDLEntity" \ + "PixX >::PixX(PixX > const &&)" test_demangling_exact "gnu: nextE__C11VHDLLibraryRt4PixX3Z11VHDLLibraryZ14VHDLLibraryRepZt4List1Z10VHDLEntity" \ "VHDLLibrary::nextE(PixX > &) const" + test_demangling_exact "gnu: nextE__C11VHDLLibraryOt4PixX3Z11VHDLLibraryZ14VHDLLibraryRepZt4List1Z10VHDLEntity" \ + "VHDLLibrary::nextE(PixX > &&) const" test_demangling_exact "gnu: next__Ct4List1Z10VHDLEntityRQ2t4List1Z10VHDLEntity3Pix" \ "List::next(List::Pix &) const" + test_demangling_exact "gnu: next__Ct4List1Z10VHDLEntityOQ2t4List1Z10VHDLEntity3Pix" \ + "List::next(List::Pix &&) const" test_demangling_exact "gnu: _GLOBAL_\$D\$set" "global destructors keyed to set" @@ -479,41 +560,67 @@ proc test_gnu_style_demangling {} { test_demangling_exact "gnu: __as__t5ListS1ZUiRCt5ListS1ZUi" \ "ListS::operator=(ListS const &)" + test_demangling_exact "gnu: __as__t5ListS1ZUiOCt5ListS1ZUi" \ + "ListS::operator=(ListS const &&)" test_demangling_exact "gnu: __cl__Ct5ListS1ZUiRCQ2t5ListS1ZUi3Vix" \ "ListS::operator()(ListS::Vix const &) const" + test_demangling_exact "gnu: __cl__Ct5ListS1ZUiOCQ2t5ListS1ZUi3Vix" \ + "ListS::operator()(ListS::Vix const &&) const" test_demangling_exact "gnu: __cl__Ct5SetLS1ZUiRCQ2t5SetLS1ZUi3Vix" \ "SetLS::operator()(SetLS::Vix const &) const" + test_demangling_exact "gnu: __cl__Ct5SetLS1ZUiOCQ2t5SetLS1ZUi3Vix" \ + "SetLS::operator()(SetLS::Vix const &&) const" test_demangling_exact "gnu: __t10ListS_link1ZUiRCUiPT0" \ "ListS_link::ListS_link(unsigned int const &, ListS_link *)" + test_demangling_exact "gnu: __t10ListS_link1ZUiOCUiPT0" \ + "ListS_link::ListS_link(unsigned int const &&, ListS_link *)" test_demangling_exact "gnu: __t10ListS_link1ZUiRCt10ListS_link1ZUi" \ "ListS_link::ListS_link(ListS_link const &)" + test_demangling_exact "gnu: __t10ListS_link1ZUiOCt10ListS_link1ZUi" \ + "ListS_link::ListS_link(ListS_link const &&)" test_demangling_exact "gnu: __t5ListS1ZUiRCt5ListS1ZUi" \ "ListS::ListS(ListS const &)" + test_demangling_exact "gnu: __t5ListS1ZUiOCt5ListS1ZUi" \ + "ListS::ListS(ListS const &&)" test_demangling_exact "gnu: next__Ct5ListS1ZUiRQ2t5ListS1ZUi3Vix" \ "ListS::next(ListS::Vix &) const" + test_demangling_exact "gnu: next__Ct5ListS1ZUiOQ2t5ListS1ZUi3Vix" \ + "ListS::next(ListS::Vix &&) const" test_demangling_exact "gnu: __ne__FPvRCQ2t5SetLS1ZUi3Vix" \ "operator!=(void *, SetLS::Vix const &)" + test_demangling_exact "gnu: __ne__FPvOCQ2t5SetLS1ZUi3Vix" \ + "operator!=(void *, SetLS::Vix const &&)" test_demangling_exact "gnu: __t8ListElem1Z5LabelRt4List1Z5Label" \ "ListElem