test/cfg/ Started to test std::complex functions.
This commit is contained in:
parent
77869b7812
commit
e9b1f1f0a6
10
cfg/std.cfg
10
cfg/std.cfg
|
@ -15,6 +15,16 @@
|
|||
<not-bool/>
|
||||
</arg>
|
||||
</function>
|
||||
<!-- std::proj(std::complex) -->
|
||||
<function name="std::proj">
|
||||
<use-retval/>
|
||||
<pure/>
|
||||
<noreturn>false</noreturn>
|
||||
<leak-ignore/>
|
||||
<arg nr="1">
|
||||
<not-uninit/>
|
||||
</arg>
|
||||
</function>
|
||||
<!-- double complex cproj(double complex x); -->
|
||||
<function name="cproj">
|
||||
<use-retval/>
|
||||
|
|
|
@ -14,7 +14,7 @@ CPPCHECK_OPT='--check-library --enable=information --enable=style --error-exitco
|
|||
|
||||
# Compiler settings
|
||||
CXX=g++
|
||||
CXX_OPT='-fsyntax-only'
|
||||
CXX_OPT='-fsyntax-only -std=c++0x'
|
||||
CC=gcc
|
||||
CC_OPT='-Wno-nonnull -fsyntax-only'
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include <cstdlib>
|
||||
#include <ctime>
|
||||
#include <cctype>
|
||||
#include <complex>
|
||||
|
||||
void bufferAccessOutOfBounds(void)
|
||||
{
|
||||
|
@ -33,6 +34,11 @@ void uninitvar(void)
|
|||
// cppcheck-suppress uninitvar
|
||||
std::abs(i);
|
||||
|
||||
double d;
|
||||
const std::complex<double> dc(d,d);
|
||||
// cppcheck-suppress uninitvar
|
||||
std::proj(dc);
|
||||
|
||||
// cppcheck-suppress uninitvar
|
||||
std::isalnum(i);
|
||||
// cppcheck-suppress uninitvar
|
||||
|
|
Loading…
Reference in New Issue