Category Archives: Code analysis

/analyze for Visual Studio-the Ugly (part 5)

/Analyze is a powerful Visual C++ feature that can help bugs. But oh my it does seem to have a lot of bugs in itself. In this post I describe some new ones that I’ve found, suggest some workarounds for … Continue reading

Posted in Code analysis, Code Reliability, Visual Studio | 5 Comments

/analyze for Visual Studio—the Ugly (part 4), False Negatives

/Analyze is a powerful Visual C++ feature that can help to find bugs. However it sometimes misses critical issues. In this quick post I describe an amusingly dangerous pattern that /analyze fails to recognize, and explain the one-true-fix. These tests … Continue reading

Posted in Code analysis, Code Reliability, Programming, Visual Studio | Leave a comment

/analyze for Visual Studio—the Ugly (part 3), False Positives

/analyze is a powerful Visual C++ feature that can help to find bugs. However it sometimes identifies problems when none exist. Unfortunately these false positives, like those reported here, make /analyze less useful because the serious bugs end up drowned … Continue reading

Posted in Code analysis, Code Reliability, Programming, Visual Studio | 10 Comments

/analyze for Visual Studio–the Ugly (part 2), False Negatives

/analyze is a powerful Visual C++ feature that can help to find bugs. However it misses some issues that it really should be able to find, two of which are discussed here today. Update: The /analyze in Visual Studio 2012 … Continue reading

Posted in Code analysis, Code Reliability, Visual Studio | Leave a comment

/analyze for Visual Studio–the Ugly (part 1)

Introduction /analyze is a powerful Visual C++ feature that can help to find bugs. However it uses some heuristics which are rather peculiar and which make it difficult to decide how seriously to take its warnings. Today we discuss one … Continue reading

Posted in Code analysis, Code Reliability, Visual Studio | 13 Comments

Adventures with /analyze for Visual Studio–the Good

The /analyze feature of the Visual C++ compiler (requires expensive Super Man edition or available for free with the Platform SDK) is a great way of improving code quality. It is basically a 21st century ‘lint’ that identifies many coding … Continue reading

Posted in Code analysis, Code Reliability, Programming, Visual Studio | Leave a comment