Improved testing of std.cfg.

This commit is contained in:
orbitcowboy 2015-09-10 16:45:14 +02:00
parent f3505f617b
commit 5e50166135
3 changed files with 28 additions and 0 deletions

View File

@ -3888,6 +3888,9 @@
<function name="find" action="find"/>
</access>
</container>
<container id="stdComplex" startPattern="std :: complex &lt;" endPattern="&gt; !!::">
<type templateParameter="1"/>
</container>
<container id="stdAllString" inherits="stdContainer">
<type string="std-like"/>
<size>

View File

@ -3378,3 +3378,11 @@ void invalidFunctionArgBool_abs(bool b, double x, double y)
// cppcheck-suppress invalidFunctionArgBool
(void)abs(x<y); // #5635
}
void ignoredReturnValue_abs(int i)
{
// cppcheck-suppress ignoredReturnValue
abs(i);
// cppcheck-suppress constStatement
abs(-100);
}

View File

@ -2709,3 +2709,20 @@ void uninitvar_setbase(void)
std::cout << std::setbase(p);
}
void invalidFunctionArgBool_abs(bool b, double x, double y)
{
// cppcheck-suppress invalidFunctionArgBool
(void)std::abs(true); // #6990
// cppcheck-suppress invalidFunctionArgBool
(void)std::abs(b); // #6990
// cppcheck-suppress invalidFunctionArgBool
(void)std::abs(x<y); // #5635
}
void ignoredReturnValue_abs(int i)
{
// cppcheck-suppress ignoredReturnValue
std::abs(i);
// cppcheck-suppress constStatement
std::abs(-199);
}