test/cfg: Improved testing of std.cfg about std::stod().

This commit is contained in:
Martin Ettl 2015-09-18 16:25:05 +02:00
parent 8936985c5c
commit fc4b9d320d
2 changed files with 24 additions and 0 deletions

View File

@ -3501,6 +3501,19 @@
</arg>
<arg nr="2"/>
</function>
<!-- double stod (const string& str, size_t* idx = 0); -->
<!-- double stod (const wstring& str, size_t* idx = 0); -->
<function name="std::stod">
<use-retval/>
<noreturn>false</noreturn>
<leak-ignore/>
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="2">
<not-uninit/>
</arg>
</function>
<!-- size_t mbrtowc(wchar_t* pwc, const char* pmb, size_t max, mbstate_t* ps); -->
<function name="mbrtowc,std::mbrtowc">
<noreturn>false</noreturn>

View File

@ -2489,6 +2489,17 @@ void uninivar_wcstof(void)
(void)std::wcstold(s,endp);
}
void uninivar_stod(void)
{
std::string str;
std::wstring wstr;
size_t* idx;
// cppcheck-suppress uninitvar
(void)std::stod(str,idx);
// cppcheck-suppress uninitvar
(void)std::stod(wstr,idx);
}
void uninivar_mbrtowc(void)
{
wchar_t* pwc;