Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | [ClangTidy] Separate tests for infrastructure and checkers | Dmitri Gribenko | 2019-10-11 | 1 | -58/+0 |
| | | | | | | | | | | | | | | | | | | | | Summary: This change moves tests for checkers and infrastructure into separate directories, making it easier to find infrastructure tests. Tests for checkers are already easy to find because they are named after the checker. Tests for infrastructure were difficult to find because they were outnumbered by tests for checkers. Now they are in a separate directory. Reviewers: jfb, jdoerfert, lebedev.ri Subscribers: srhines, nemanjai, aheejin, kbarton, christof, mgrang, arphaman, jfb, lebedev.ri, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68807 llvm-svn: 374540 | ||||
* | [clang-tidy] Add support for operator new[] in check ↵ | Adam Balogh | 2017-11-23 | 1 | -0/+25 |
| | | | | | | | | | bugprone-misplaced-operator-in-strlen-in-alloc The check now recognizes error cases like `new char[strlen(s + 1)]` and suggests a fix in the format `new char[strlen(s) + 1]`. llvm-svn: 318912 | ||||
* | [clang-tidy] Misplaced Operator in Strlen in Alloc | Adam Balogh | 2017-11-23 | 1 | -0/+33 |
A possible error is to write `malloc(strlen(s+1))` instead of `malloc(strlen(s)+1)`. Unfortunately the former is also valid syntactically, but allocates less memory by two bytes (if `s` is at least one character long, undefined behavior otherwise) which may result in overflow cases. This check detects such cases and also suggests the fix for them. Fix for r318906, forgot to add new files. llvm-svn: 318907 |