How to: Invoke Code Analysis for C/C++
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

How to: Invoke Code Analysis for C/C++

Code analysis tool detects common coding errors, such as buffer overrun, un-initialized memory, null pointer dereference, and memory and resource leaks.

To enable code analysis for C/C++ code

  1. Open a project in Visual Studio.

  2. On the Project menu, click Properties.

  3. Click Code Analysis.

  4. In the Enable Code Analysis for C/C++ list, select Yes (/analyze) and then click OK.

To disable code analysis for C/C++ code

  1. Open a project in Visual Studio.

  2. On the Project menu, click Properties.

  3. Click Code Analysis.

  4. In the Enable Code Analysis for C/C++ list, select No and then click OK.

Show:
© 2016 Microsoft