User and Reference Guide for the Intel® C++ Compiler 14.0

Using Static Analysis in the Visual Studio* IDE

The following applies to Microsoft Visual Studio* 2010 and 2008.

To build your application for static analysis in Microsoft Visual Studio*, use the Build for Intel Static Analysis menu option.

There are several forms of the Build for Intel Static Analysis menu option, including:

These forms appear in all menus that can build projects or solutions, including the Build menu and the popup menu that appears when you right click on selected project(s) or the solution.

Setting the Intel_SSA Configuration

The first time Build for Intel Static Analysis is selected, a Create configuration dialog box appears to create a new build configuration for static analysis called Intel_SSA with the required properties for the Visual Studio* IDE.

In the Create configuration dialog box, set the following:

Copy configuration settings from: Specify the configuration from which settings should be copied.

Level of Static Analysis: Select the desired level of analysis.

Mode of Static Analysis: Choose one of the following modes:

Additional Options: Choose these options to analyze include files, individual files, or to treat enumerations as known ranges.

Build for Static Analysis after creating configuration: Check this box to create a new configuration called Intel_SSA build the selected project(s) using static analysis. If the checkbox is not checked, configuration for static analysis will be created and will run the next time Build for Intel Static Analysis is selected.

Performing static analysis for an Intel® C++ Solution

To perform static analysis on Intel® C++ solutions and projects:

  1. Choose Build for Intel Static Analysis (or one of the variant forms).
  2. Configure the Intel_SSAConfiguration (if prompted).

Analysis results will open automatically in the Intel® Inspector XE user interface.

Using static analysis for a Visual C++* Solution or a Mixed Solution

To perform static analysis on Visual C++* only solutions and projects or on a mixed solution containing both Intel® C++ and Visual C++* projects, do the following:

  1. Choose Build for Intel Static Analysis.
  2. For Visual Studio* 2008: Check and uncheck projects in the Prepare Projects dialog box that appears. This dialog box shows all Visual C++* projects in the solution. Initially, all Visual C++* projects are selected for static analysis. Uncheck any projects that do not require it. Click Next.

    Note

    Existing configurations will not be modified. The Solution Explorer view will show a different icon to indicate that a project configuration is built by the Intel® C++ Compiler.

Analysis results will open automatically in the Intel® Inspector XE user interface.

Note

Preparing a Visual C++* project for use with static analysis does not cause the existing configurations to build with the Intel compiler. However, it does modify the solution (.sln) file and adds an Intel project (.icproj) file for each prepared project. After these changes, the solution will no longer build on systems where the Intel® C++ Compiler is not installed. In a team environment where some team members will not install the Intel® C++ Compiler, it is best to treat these modifications as temporary and discard them after running static analysis. You can always use the menu item to perform the preparation step again as needed.

Modifying the Intel_SSA Configuration

There are several Visual Studio* IDE property pages related to static analysis. You can change the options for static analysis by modifying the properties for the Intel_SSA configuration. To do this, use the following property pages:

See Also


Submit feedback on this help topic