aboutsummaryrefslogtreecommitdiff
path: root/test/Analysis/cstring-syntax.c
AgeCommit message (Collapse)Author
2012-08-07Turn on strncat-size warning implemented a while ago.Anna Zaks
Warns on anti-patterns/typos in the 'size' argument to strncat. The correct size argument should look like the following: - strncat(dst, src, sizeof(dst) - strlen(dest) - 1); We warn on: - sizeof(dst) - sizeof(src) - sizeof(dst) - strlen(dst) - sizeof(src) - anything (This has been implemented in void Sema::CheckStrncatArguments().) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161440 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-20[analyzer] Turn on by default the Malloc Checker and a couple of CStringAnna Zaks
checks: - unix.Malloc - Checks for memory leaks, double free, use-after-free. - unix.cstring.NullArg - Checks for null pointers passed as arguments to CString functions + evaluates CString functions. - unix.cstring.BadSizeArg - Checks for common anti-patterns in strncat size argument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150988 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31[analyzer] Add checks for common anti-patterns in strncat.Anna Zaks
(Since this is syntax only, might be a good candidate for turning into a compiler warning.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149407 91177308-0d34-0410-b5e6-96231b3b80d8