std.cfg: Add support for std::string::assign() (#1660)
Reference: https://en.cppreference.com/w/cpp/string/basic_string/assign
This commit is contained in:
parent
71612d58e1
commit
3427e61383
34
cfg/std.cfg
34
cfg/std.cfg
|
@ -6466,6 +6466,40 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
|
|||
<not-uninit/>
|
||||
</arg>
|
||||
</function>
|
||||
<!-- https://en.cppreference.com/w/cpp/string/basic_string/assign -->
|
||||
<function name="std::basic_string::assign">
|
||||
<noreturn>false</noreturn>
|
||||
<leak-ignore/>
|
||||
<returnValue type="std::basic_string &"/>
|
||||
<arg nr="1">
|
||||
<not-uninit/>
|
||||
</arg>
|
||||
<arg nr="any">
|
||||
<not-uninit/>
|
||||
</arg>
|
||||
</function>
|
||||
<function name="std::string::assign">
|
||||
<noreturn>false</noreturn>
|
||||
<leak-ignore/>
|
||||
<returnValue type="std::string &"/>
|
||||
<arg nr="1">
|
||||
<not-uninit/>
|
||||
</arg>
|
||||
<arg nr="any">
|
||||
<not-uninit/>
|
||||
</arg>
|
||||
</function>
|
||||
<function name="std::wstring::assign">
|
||||
<noreturn>false</noreturn>
|
||||
<leak-ignore/>
|
||||
<returnValue type="std::wstring &"/>
|
||||
<arg nr="1">
|
||||
<not-uninit/>
|
||||
</arg>
|
||||
<arg nr="any">
|
||||
<not-uninit/>
|
||||
</arg>
|
||||
</function>
|
||||
<!-- std::string& std::string::append (const std::string& str); -->
|
||||
<function name="std::string::append">
|
||||
<noreturn>false</noreturn>
|
||||
|
|
|
@ -3332,6 +3332,9 @@ void stdstring()
|
|||
std::string s;
|
||||
// cppcheck-suppress ignoredReturnValue
|
||||
s.size();
|
||||
|
||||
// valid
|
||||
s.assign("a");
|
||||
}
|
||||
|
||||
void stdvector()
|
||||
|
|
Loading…
Reference in New Issue