summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-tidy/google-runtime-memset-zero-length.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [clang-tidy] Add bugprone-suspicious-memset-usage checkGabor Horvath2017-07-141-62/+0
| | | | | | | | | | | | | | | | | | Created new module bugprone and placed the check in that. Finds memset() calls with potential mistakes in their arguments. Replaces and extends the existing google-runtime-memset-zero-length check. Cases covered: * Fill value is a character '0'. Integer 0 might have been intended. * Fill value is out of char range and gets truncated. * Byte count is zero. Potentially swapped with the fill value argument. Patch by: Reka Nikolett Kovacs Differential Revision: https://reviews.llvm.org/D32700 llvm-svn: 308020
* [clang-tidy] Fix a false positive in google-runtime-memsetAlexander Kornienko2016-01-111-4/+6
| | | | | | | | | | | | | | | | | google-runtime-memset no longer issues a warning if the fill char value is known to be an invalid fill char count. Namely, it no longer warns for these: memset(p, 0, 0); memset(p, -1, 0); In both cases, swapping the last two args would either be useless (there is no actual bug) or wrong (it would introduce a bug). Patch by Matt Armstrong! llvm-svn: 257320
* Add %check_clang_tidy and %clang_tidy_diff.Manuel Klimek2015-10-221-1/+1
| | | | | | | | | | With this, site specific lit configs can inject parameters into the test scripts if they need site specific parameters. Next up: enable check_clang_tidy to take a resource dir to enable non-standard locations for builtin includes. llvm-svn: 251010
* [clang-tidy] Renamed tests files to be closer to the check names.Alexander Kornienko2015-09-101-0/+60
llvm-svn: 247266
OpenPOWER on IntegriCloud