Commit d2469bc9 authored by hjk's avatar hjk
Browse files

CppRewriter: Treat libc++'s std::__1:: as std:: for debugger display



Change-Id: Iabc1330633e5568b7c94059d4286c93adfecb1a2
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@digia.com>
parent a6626b49
......@@ -527,6 +527,7 @@ CPLUSPLUS_EXPORT QString simplifySTLType(const QString &typeIn)
if (type.startsWith(QLatin1String("struct ")))
type.remove(0, 7);
type.replace(QLatin1String("std::__1::"), QLatin1String("std::"));
type.replace(QLatin1Char('*'), QLatin1Char('@'));
for (int i = 0; i < 10; ++i) {
......
......@@ -42,6 +42,7 @@ const char *description[] =
"g++_stringset",
"g++_stringvector",
"g++_wstringvector",
"libc++_stringvector",
"msvc_stdstring",
"msvc_stdwstring",
"msvc_stringmap",
......@@ -63,6 +64,8 @@ const char *input[] =
"std::set<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >",
"std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >",
"std::vector<std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >, std::allocator<std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > >",
// libc++
"std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >",
// MSVC
"class std::basic_string<char,std::char_traits<char>,std::allocator<char> >",
"class std::basic_string<unsigned short,std::char_traits<unsigned short>,std::allocator<unsigned short> >",
......@@ -76,6 +79,7 @@ const char *input[] =
const char *output[] =
{
// Gcc
"std::string",
"std::wstring",
"std::map<std::string, std::string>",
......@@ -84,6 +88,9 @@ const char *output[] =
"std::set<std::string>",
"std::vector<std::string>",
"std::vector<std::wstring>",
// libc++
"std::vector<std::string>",
// MSVC
"std::string",
"std::wstring",
"std::map<std::string, std::string>",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment