Problems with io_src code std::string #352

Added a test for types matching std::__cxx11::basic_string in ICG.  If it
matches we use the type back to std::string.
This commit is contained in:
Alex Lin 2017-01-11 17:37:57 -06:00
parent de1d970909
commit aa58306cc0

View File

@ -270,7 +270,8 @@ bool FieldVisitor::VisitRecordType(clang::RecordType *rt) {
if ( rt->getDecl()->getDeclName() ) {
std::string type_name = rt->getDecl()->getQualifiedNameAsString() ;
// Handle the string class differently than regular records.
if ( ! type_name.compare("std::basic_string") || !type_name.compare("std::__1::basic_string")) {
if ( ! type_name.compare("std::basic_string") || !type_name.compare("std::__1::basic_string") ||
! type_name.compare("std::__cxx11::basic_string")) {
fdes->setEnumString("TRICK_STRING") ;
fdes->setTypeName("std::string") ;
fdes->setHasType(true) ;