| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Ran clang-format on all .c/.cpp/.h files in clang-tools-extra.
Excluded the test, unittests, clang-reorder-fields, include-fixer, modularize and pptrace directories.
Reviewers: klimek, alexfh
Subscribers: nemanjai
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D26329
llvm-svn: 286221
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
clang::tidy::google
http://reviews.llvm.org/D7994
Patch by Richard Thomson!
llvm-svn: 231364
|
|
|
|
|
|
|
| |
No functionality changed, this is just a mechanical cleanup to keep the
order of #include lines consistent across the project.
llvm-svn: 225976
|
|
|
|
|
|
|
|
| |
of copying it everywhere.
No intended functionality change.
llvm-svn: 217035
|
|
|
|
|
|
| |
dependent values.
llvm-svn: 213238
|
|
|
|
|
|
|
|
|
| |
negative-sized memsets.
memset(x, -1, 0) is still useless but swapping makes no sense here. Just emit
a warning.
llvm-svn: 213157
|
|
|
|
|
|
|
| |
It doesn't make sense to suggest swapping the arguments here but it's
still useless code
llvm-svn: 213156
|
|
If there's memset(x, y, 0) in the code it's most likely a mistake. The
checker suggests a fix-it to swap 'y' and '0'.
I think this has the potential to be promoted into a general clang warning
after some testing in clang-tidy.
Differential Revision: http://reviews.llvm.org/D4535
llvm-svn: 213155
|