Static verification analyzes C/C++ source code and checks for various kinds of errors, warnings, and/or debatable points in your program. It also points out places of improper code style and flaws in object-oriented design solutions.
Static verification detects issues with the following:
The following examples illustrate C/C++ specific analysis.
Example 1: C++ Exception Handling issues
/**
* uncaught exception test
**/
void
f()
{
throw 1.23;
}
int
main()
{
f();
return 0;
}
Static verification issues the following message:
uncatched.cpp(7): warning #12228: Seems that thrown exception is not caught in the whole program
Example 2: CTOR/CCTOR/DTOR/assignment operator issues
class A {
public:
explicit
A(int data);
A&
operator =(const A& rhs);
private:
int data_;
};
Static verification issues the following message:
Warning : Class A: assignment operator is defined, but CCTOR and DTOR are not.