[all-commits] [llvm/llvm-project] bcb3bd: [clang-tidy] Raise minimum standard level for seve...
Victor Chernyakin via All-commits
all-commits at lists.llvm.org
Thu Sep 4 10:33:18 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: bcb3bd09275f833a76d1122f59d4b49b52c8d299
https://github.com/llvm/llvm-project/commit/bcb3bd09275f833a76d1122f59d4b49b52c8d299
Author: Victor Chernyakin <chernyakin.victor.j at outlook.com>
Date: 2025-09-04 (Thu, 04 Sep 2025)
Changed paths:
M clang-tools-extra/clang-tidy/modernize/ReplaceAutoPtrCheck.h
M clang-tools-extra/clang-tidy/modernize/UseAutoCheck.h
M clang-tools-extra/clang-tidy/modernize/UseEqualsDeleteCheck.h
M clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.h
M clang-tools-extra/test/clang-tidy/checkers/modernize/use-nullptr-basic.cpp
Log Message:
-----------
[clang-tidy] Raise minimum standard level for several checks from C++98 to C++11 (#152401)
`modernize-replace-auto-ptr`, `modernize-use-equals-delete`, and
`modernize-use-auto` use `std::unique_ptr`, `= delete`, and `auto`
respectively, which are all C++11 features.
The interesting bit is `modernize-use-nullptr`'s tests:
- Some relied on int-to-pointer conversions that were removed in C++11.
There are two variations here. First, tests like this, which become
ill-formed:
```cpp
const int null = 0;
void * ptr = null;
```
I just deleted these cases; if they're ill-formed, we're not losing
anything, right?
Second, tests like this:
```cpp
float * ptr = (float *)int(0.f);
```
These don't become ill-formed, but start generating a different AST. In
C++98, they are `NullToPointer` conversions, but in C++11, they become
generic `IntegralToPointer` conversions. I deleted these cases too,
though I'm less sure here.
- Folded `struct Bar` into `class A`, because those both suffer from the
same false negatives.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list