[clang-tools-extra] [clang-tidy] add modernize-use-constexpr check (PR #146553)
Sean McBride via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 23 10:04:11 PDT 2025
seanm wrote:
I've just tried VTK again, and seems there's only one compiler error now:
```diff
- operator bool() const noexcept { return this->InT >= 0.0 && this->OutT >= 0.0; }
+ operator constexpr bool() const noexcept { return this->InT >= 0.0 && this->OutT >= 0.0; }
```
```
VTK/Filters/ParallelDIY2/vtkProbeLineFilter.cxx:73:12: error: type name does not allow constexpr specifier to be specified
73 | operator constexpr bool() const noexcept { return this->InT >= 0.0 && this->OutT >= 0.0; }
| ^
```
https://github.com/llvm/llvm-project/pull/146553
More information about the cfe-commits
mailing list