From e9b1f1f0a63fc9f21b91db1bc8a1d456dbeea765 Mon Sep 17 00:00:00 2001 From: Martin Ettl Date: Fri, 14 Aug 2015 02:06:48 +0200 Subject: [PATCH] test/cfg/ Started to test std::complex functions. --- cfg/std.cfg | 10 ++++++++++ test/cfg/runtests.sh | 2 +- test/cfg/std.cpp | 6 ++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/cfg/std.cfg b/cfg/std.cfg index 0f891deab..4066a05e8 100644 --- a/cfg/std.cfg +++ b/cfg/std.cfg @@ -15,6 +15,16 @@ + + + + + false + + + + + diff --git a/test/cfg/runtests.sh b/test/cfg/runtests.sh index 53bb29ec4..51dff0d53 100755 --- a/test/cfg/runtests.sh +++ b/test/cfg/runtests.sh @@ -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' diff --git a/test/cfg/std.cpp b/test/cfg/std.cpp index 608cae135..dd984a489 100644 --- a/test/cfg/std.cpp +++ b/test/cfg/std.cpp @@ -12,6 +12,7 @@ #include #include #include +#include void bufferAccessOutOfBounds(void) { @@ -33,6 +34,11 @@ void uninitvar(void) // cppcheck-suppress uninitvar std::abs(i); + double d; + const std::complex dc(d,d); + // cppcheck-suppress uninitvar + std::proj(dc); + // cppcheck-suppress uninitvar std::isalnum(i); // cppcheck-suppress uninitvar