demangle.h (qualifier_list<Allocator>::decode_qualifiers(string_type&, string_type&, bool member_function_pointer_qualifiers): Always seperate the '[' of an array type with a space from what is left of it...
* include/bits/demangle.h (qualifier_list<Allocator>::decode_qualifiers(string_type&, string_type&, bool member_function_pointer_qualifiers): Always seperate the '[' of an array type with a space from what is left of it, except when that is the closing bracket of another array dimension. From-SVN: r73328
This commit is contained in:
parent
2215f7320e
commit
eb622d37cf
|
@ -1,3 +1,12 @@
|
||||||
|
2003-11-07 Carlo Wood <carlo@alinoe.com>
|
||||||
|
|
||||||
|
* include/bits/demangle.h
|
||||||
|
(qualifier_list<Allocator>::decode_qualifiers(string_type&,
|
||||||
|
string_type&, bool member_function_pointer_qualifiers):
|
||||||
|
Always seperate the '[' of an array type with a space from
|
||||||
|
what is left of it, except when that is the closing bracket
|
||||||
|
of another array dimension.
|
||||||
|
|
||||||
2003-11-07 Carlo Wood <carlo@alinoe.com>
|
2003-11-07 Carlo Wood <carlo@alinoe.com>
|
||||||
|
|
||||||
* include/bits/demangle.h
|
* include/bits/demangle.h
|
||||||
|
|
|
@ -1380,7 +1380,7 @@ namespace __gnu_cxx
|
||||||
// <Q>[K|V|r]+ ==> [ const| volatile| restrict]+Q "KVr..."
|
// <Q>[K|V|r]+ ==> [ const| volatile| restrict]+Q "KVr..."
|
||||||
// <Q>U<S> ==> SQ "U<S>..."
|
// <Q>U<S> ==> SQ "U<S>..."
|
||||||
// <Q>M<C> ==> C::*Q "M<C>..." (<C> recurs.)
|
// <Q>M<C> ==> C::*Q "M<C>..." (<C> recurs.)
|
||||||
// A<I> ==> [I] "A<I>..." (<I> recurs.)
|
// A<I> ==> [I] "A<I>..." (<I> recurs.)
|
||||||
// <Q>A<I> ==> (Q) [I] "A<I>..." (<I> recurs.)
|
// <Q>A<I> ==> (Q) [I] "A<I>..." (<I> recurs.)
|
||||||
// Note that when <Q> ends on an A<I2> then the brackets are omitted:
|
// Note that when <Q> ends on an A<I2> then the brackets are omitted:
|
||||||
// A<I2>A<I> ==> [I2][I]
|
// A<I2>A<I> ==> [I2][I]
|
||||||
|
@ -1454,14 +1454,15 @@ namespace __gnu_cxx
|
||||||
case 'A':
|
case 'A':
|
||||||
{
|
{
|
||||||
string_type index = (*iter).get_optional_type();
|
string_type index = (*iter).get_optional_type();
|
||||||
if (++iter != M_qualifier_starts.rend()
|
if (++iter == M_qualifier_starts.rend())
|
||||||
&& (*iter).first_qualifier() != 'A')
|
postfix = " [" + index + "]" + postfix;
|
||||||
|
else if ((*iter).first_qualifier() == 'A')
|
||||||
|
postfix = "[" + index + "]" + postfix;
|
||||||
|
else
|
||||||
{
|
{
|
||||||
prefix += " (";
|
prefix += " (";
|
||||||
postfix = ") [" + index + "]" + postfix;
|
postfix = ") [" + index + "]" + postfix;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
postfix = "[" + index + "]" + postfix;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'M':
|
case 'M':
|
||||||
|
|
|
@ -34,7 +34,7 @@ int main()
|
||||||
{ static int bar; };
|
{ static int bar; };
|
||||||
int Foo<int[4]>::bar;
|
int Foo<int[4]>::bar;
|
||||||
*/
|
*/
|
||||||
verify_demangle("_ZN3FooIA4_iE3barE", "Foo<int[4]>::bar");
|
verify_demangle("_ZN3FooIA4_iE3barE", "Foo<int [4]>::bar");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ int main()
|
||||||
// verify_demangle("_Z1fAszL_ZZNK1N1A1fEvE3foo_0E_i",
|
// verify_demangle("_Z1fAszL_ZZNK1N1A1fEvE3foo_0E_i",
|
||||||
// "f(int[sizeof(N::A::f() const::foo())])");
|
// "f(int[sizeof(N::A::f() const::foo())])");
|
||||||
verify_demangle("_Z1fAszL_ZZNK1N1A1fEvE3foo_0E_i",
|
verify_demangle("_Z1fAszL_ZZNK1N1A1fEvE3foo_0E_i",
|
||||||
"f(int[sizeof(N::A::f() const::foo)])");
|
"f(int [sizeof(N::A::f() const::foo)])");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ int main()
|
||||||
{
|
{
|
||||||
using namespace __gnu_test;
|
using namespace __gnu_test;
|
||||||
// cplus-dem FAIL
|
// cplus-dem FAIL
|
||||||
verify_demangle("_Z1fA37_iPS_", "f(int[37], int (*) [37])");
|
verify_demangle("_Z1fA37_iPS_", "f(int [37], int (*) [37])");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ int main()
|
||||||
using namespace __gnu_test;
|
using namespace __gnu_test;
|
||||||
|
|
||||||
// cplus-dem FAIL
|
// cplus-dem FAIL
|
||||||
verify_demangle("_Z3fooA30_A_i", "foo(int[30][])");
|
verify_demangle("_Z3fooA30_A_i", "foo(int [30][])");
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue