[llvm-branch-commits] [cfe-branch] r215314 - Also describe the new check 'alpha.core.TestAfterDivZero'
Sylvestre Ledru
sylvestre at debian.org
Sun Aug 10 05:41:40 PDT 2014
Author: sylvestre
Date: Sun Aug 10 07:41:40 2014
New Revision: 215314
URL: http://llvm.org/viewvc/llvm-project?rev=215314&view=rev
Log:
Also describe the new check 'alpha.core.TestAfterDivZero'
Modified:
cfe/branches/release_35/docs/ReleaseNotes.rst
Modified: cfe/branches/release_35/docs/ReleaseNotes.rst
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_35/docs/ReleaseNotes.rst?rev=215314&r1=215313&r2=215314&view=diff
==============================================================================
--- cfe/branches/release_35/docs/ReleaseNotes.rst (original)
+++ cfe/branches/release_35/docs/ReleaseNotes.rst Sun Aug 10 07:41:40 2014
@@ -166,6 +166,16 @@ libclang
Static Analyzer
---------------
+Check for code testing a variable for 0 after using it as a denominator.
+This new checker, alpha.core.TestAfterDivZero, catches issues like this:
+
+.. code:: c
+
+ int sum = ...
+ int avg = sum / count; // potential division by zero...
+ if (count == 0) { ... } // ...caught here
+
+
The `-analyzer-config` options are now passed from scan-build through to
ccc-analyzer and then to Clang.
More information about the llvm-branch-commits
mailing list