update std::string config

This commit is contained in:
Daniel Marjamäki 2017-03-05 18:19:49 +01:00
parent 6c1096bf71
commit e560ad1616
2 changed files with 40 additions and 0 deletions

View File

@ -4023,9 +4023,27 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
<not-uninit/>
</arg>
</function>
<function name="std::string::at">
<noreturn>false</noreturn>
<returnValue type="char"/>
<use-retval/>
<arg nr="1">
<not-uninit/>
<valid>0:</valid>
</arg>
</function>
<function name="std::string::c_str">
<noreturn>false</noreturn>
<returnValue type="const char *"/>
<use-retval/>
</function>
<function name="std::string::clear">
<noreturn>false</noreturn>
</function>
<function name="std::string::empty">
<noreturn>false</noreturn>
<returnValue type="bool"/>
<use-retval/>
</function>
<!-- size_t find (const string& str, size_t pos = 0) const; -->
<!-- size_t find (const char* s, size_t pos, size_t n) const; -->
@ -4047,6 +4065,16 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
<valid>0:</valid>
</arg>
</function>
<function name="std::string::length">
<noreturn>false</noreturn>
<returnValue type="std::size_t"/>
<use-retval/>
</function>
<function name="std::string::size">
<noreturn>false</noreturn>
<returnValue type="std::size_t"/>
<use-retval/>
</function>
<!-- istream& read (char* s, streamsize n);
ifstream& read (char* s, streamsize n); -->
<function name="std::istream::read,std::ifstream::read">

View File

@ -5001,6 +5001,18 @@ bool ValueType::fromLibraryType(const std::string &typestr, const Settings *sett
if (platformType->_const_ptr)
constness = 1;
return true;
} else if (!podtype && (typestr == "size_t" || typestr == "std::size_t")) {
originalTypeName = "size_t";
sign = ValueType::UNSIGNED;
if (settings->sizeof_size_t == settings->sizeof_long)
type = ValueType::Type::LONG;
else if (settings->sizeof_size_t == settings->sizeof_long_long)
type = ValueType::Type::LONGLONG;
else if (settings->sizeof_size_t == settings->sizeof_int)
type = ValueType::Type::INT;
else
type = ValueType::Type::UNKNOWN_INT;
return true;
}
return false;