4 Commits

Author SHA1 Message Date
Kazu Hirata
02b89b8f47
[clang-tidy] Use llvm::none_of (NFC) (#151801)
We can pass a range to llvm::none_if.
2025-08-02 08:09:41 -07:00
Piotr Zegar
75adb12269
[clang-tidy] Fix handling of parentheses in bugprone-non-zero-enum-to-bool-conversion (#81890)
Properly ignore parentheses in bitwise operators.

Closes #81515
2024-02-17 08:58:22 +01:00
Piotr Zegar
503e31528a
[clang-tidy] Exclude bitwise operators in bugprone-non-zero-enum-to-bool-conversion (#65498)
Improved bugprone-non-zero-enum-to-bool-conversion check by eliminating
false positives resulting from direct usage of bitwise operators.
2023-09-10 18:08:51 +02:00
Piotr Zegar
3bf322e69d [clang-tidy] Add bugprone-non-zero-enum-to-bool-conversion check
Detect implicit and explicit conversions of enum to bool,
when enum doesn't have a enumerator with value equal to 0.
In theory such conversion should always return TRUE.

Reviewed By: carlosgalvezp

Differential Revision: https://reviews.llvm.org/D144036
2023-04-16 08:51:00 +00:00