diff options
author | Borsik Gabor <gabor.borsik@gmail.com> | 2019-11-23 20:55:19 +0100 |
---|---|---|
committer | Borsik Gabor <gabor.borsik@gmail.com> | 2019-11-23 20:55:19 +0100 |
commit | 79e2325f145d057e9cb0c3900faa3e7a9d84cde6 (patch) | |
tree | 03d33a3521ebdcb9d81c9352e5c77944962c2841 | |
parent | 46883f46dc4f0ec3eb5cf2a6c5492bbd2c57c8c2 (diff) | |
download | bcm5719-llvm-79e2325f145d057e9cb0c3900faa3e7a9d84cde6.tar.gz bcm5719-llvm-79e2325f145d057e9cb0c3900faa3e7a9d84cde6.zip |
[analyzer][docs] NFC: Extend documentation for MallocOverflow checker
Patch by Benics Balázs
Differential Revision: https://reviews.llvm.org/D70596
-rw-r--r-- | clang/docs/analyzer/checkers.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/docs/analyzer/checkers.rst b/clang/docs/analyzer/checkers.rst index a751b148097..b410c085878 100644 --- a/clang/docs/analyzer/checkers.rst +++ b/clang/docs/analyzer/checkers.rst @@ -1974,6 +1974,12 @@ Check for overflows in the arguments to malloc(). void *p = malloc(n * sizeof(int)); // warn } + void test2(int n) { + if (n > 100) // gives an upper-bound + return; + void *p = malloc(n * sizeof(int)); // no warning + } + .. _alpha-security-MmapWriteExec: alpha.security.MmapWriteExec (C) |