Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3 |
|
#
3605d9a4 |
| 23-Oct-2024 |
Nicolas van Kempen <nvankemp@gmail.com> |
[clang-tidy][readability-container-contains] Fix matching of non-binaryOperator cases (#110386)
Fix #79437.
|
Revision tags: llvmorg-19.1.2, llvmorg-19.1.1 |
|
#
14c76321 |
| 19-Sep-2024 |
Nicolas van Kempen <nvankemp@gmail.com> |
[clang-tidy][readability-container-contains] Use hasOperands when possible (#109178)
Simplifies two cases and matches two new cases previously missing,
`container.end() [!=]= container.find(...)`.
|
#
1be4c971 |
| 18-Sep-2024 |
Nicolas van Kempen <nvankemp@gmail.com> |
[clang-tidy][readability-container-contains] Extend to any class with contains (#107521)
This check will now work out of the box with other containers that have a
`contains` method, such as `folly:
[clang-tidy][readability-container-contains] Extend to any class with contains (#107521)
This check will now work out of the box with other containers that have a
`contains` method, such as `folly::F14` or Abseil containers.
It will also work with strings, which are basically just weird containers.
`std::string` and `std::string_view` will have a `contains` method starting with
C++23. `llvm::StringRef` and `folly::StringPiece` are examples of existing
implementations with a `contains` method.
show more ...
|
Revision tags: llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init |
|
#
8ac84a95 |
| 04-Dec-2023 |
Thomas Schenker <thomas.schenker@protonmail.com> |
[clang-tidy] readability-container-contains literal suffixes (#74215)
Before this PR, readability-container-contains fix-its did not handle
integer literal suffixes correctly. It e.g. changed
```
[clang-tidy] readability-container-contains literal suffixes (#74215)
Before this PR, readability-container-contains fix-its did not handle
integer literal suffixes correctly. It e.g. changed
```
MyMap.count(2) != 0U;
```
into
```
MyMap.contains(2)U;
```
With this PR, it correctly changes it to
```
MyMap.contains(2);
```
show more ...
|
Revision tags: llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2 |
|
#
fda77784 |
| 06-Aug-2023 |
Adrian Vogelsgesang <avogelsgesang@salesforce.com> |
[clang-tidy] Update tests to include C++23 and C++26
This commit changes the `c++xx-or-later` definitions to also include C++23 and the upcoming C++26. `readability/container-contains.cpp` to also t
[clang-tidy] Update tests to include C++23 and C++26
This commit changes the `c++xx-or-later` definitions to also include C++23 and the upcoming C++26. `readability/container-contains.cpp` to also test newer C++ versions.
Also, this commit adjusts a couple of test cases slightly: * `container-contains.cpp` now also tests newer C++ versions. Restricting it to C++20 was an oversight of mine when originally writing this check. * `unconventional-assign-operator.cpp`: The `return rhs` raised a "non-const lvalue reference to type 'BadReturnStatement' cannot bind to a temporary" error in C++23. The issue is circumenvented by writing `return *&rhs`. * `const-correctness-values.cpp` was also running into the same error in C++23. The troublesome test cases were moved to a separate file.
Differential Revision: https://reviews.llvm.org/D157246
show more ...
|
Revision tags: llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6 |
|
#
89a1d03e |
| 17-Jun-2022 |
Richard <legalize@xmission.com> |
[clang-tidy] Organize test files into subdirectories by module (NFC)
Eliminate clutter by reorganizing the Lit test files for clang-tidy: - Move checkers/<module>-* to checkers/<module>/*. - Move mo
[clang-tidy] Organize test files into subdirectories by module (NFC)
Eliminate clutter by reorganizing the Lit test files for clang-tidy: - Move checkers/<module>-* to checkers/<module>/*. - Move module specific inputs from Inputs to <module>/Inputs. Remove any module prefix from the file or subdirectory name as they are no longer needed. - Introduce a Lit substitution %clang_tidy_headers for the system headers in checkers/Inputs/Headers and use this throughout. This avoids referencing system headers through a relative path to the parent directory and makes it clear that these fake system headers are shared among all modules. - Update add_new_check.py to follow the above conventions when creating the boiler plate test files for a new check. - Update Contributing.rst to describe per-module Inputs directory and fix link to test source code.
Differential Revision: https://reviews.llvm.org/D128072
show more ...
|