aaronpuchert added a comment.

The change seems to be correct, but I'm wondering if `x.getValueKind() == 
VK_*Value` doesn't have one advantage over `x.is*Value()`: it's obvious that 
this is exclusive with the other values. Especially with `isRValue()` it might 
not be so obvious, because Clang doesn't follow the C++11 terminology with this.

But it's admittedly shorter, so I'd be willing to approve this.



================
Comment at: clang/lib/Sema/SemaExpr.cpp:5522
     }
     VK = LHSExp->getValueKind();
     if (VK != VK_RValue)
----------------
There might be a certain benefit to using `LHSExp->getValueKind()` above when 
we use it here again: that makes it more obvious what we're trying to achieve 
in that `if`. (Namely changing the value category.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100733/new/

https://reviews.llvm.org/D100733

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to