This revision was automatically updated to reflect the committed changes. Closed by commit rG79e2325f145d: [analyzer][docs] NFC: Extend documentation for MallocOverflow checker (authored by boga95).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70596/new/ https://reviews.llvm.org/D70596 Files: clang/docs/analyzer/checkers.rst Index: clang/docs/analyzer/checkers.rst =================================================================== --- clang/docs/analyzer/checkers.rst +++ clang/docs/analyzer/checkers.rst @@ -1974,6 +1974,12 @@ 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)
Index: clang/docs/analyzer/checkers.rst =================================================================== --- clang/docs/analyzer/checkers.rst +++ clang/docs/analyzer/checkers.rst @@ -1974,6 +1974,12 @@ 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)
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits