]> granicus.if.org Git - clang/commitdiff
Also describe the new check 'alpha.core.TestAfterDivZero'
authorSylvestre Ledru <sylvestre@debian.org>
Sun, 10 Aug 2014 12:41:40 +0000 (12:41 +0000)
committerSylvestre Ledru <sylvestre@debian.org>
Sun, 10 Aug 2014 12:41:40 +0000 (12:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_35@215314 91177308-0d34-0410-b5e6-96231b3b80d8

docs/ReleaseNotes.rst

index 95478992fc669d4392b241abfb748a97df2f0736..e137be83782b79d046e4828930f4e80abec4f60e 100644 (file)
@@ -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.