================
@@ -132,18 +139,18 @@ unsigned __tree_sub_invariant(_NodePtr __x) {
if (__x->__left_ == __x->__right_ && __x->__left_ != nullptr)
return 0;
// If this is red, neither child can be red
- if (!__x->__is_black_) {
- if (__x->__left_ && !__x->__left_->__is_black_)
+ if (__x->__color_ == __red) {
----------------
ldionne wrote:
```suggestion
if (__x->__color_ == __tree_color::__red) {
```
The combination of `using enum __tree_color;` and using lowercase for the enum
constants hurt readability IMO -- it makes it look like a variable comparison.
I would at minimum qualify the enum accesses throughout.
https://github.com/llvm/llvm-project/pull/147679
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits