From: Sylvestre Ledru Date: Sun, 10 Aug 2014 12:41:40 +0000 (+0000) Subject: Also describe the new check 'alpha.core.TestAfterDivZero' X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=db3e4f88319b72e21392aa4093fcb7973af081ef;p=clang Also describe the new check 'alpha.core.TestAfterDivZero' git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_35@215314 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/docs/ReleaseNotes.rst b/docs/ReleaseNotes.rst index 95478992fc..e137be8378 100644 --- a/docs/ReleaseNotes.rst +++ b/docs/ReleaseNotes.rst @@ -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.