[PATCH] D100733: [clang] NFC: change uses of `Expr->getValueKind` into `is?Value`

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 14 17:02:17 PDT 2021


rsmith added a comment.

I don't think out-of-tree experiments on possibilities for move semantics are especially motivating for this, one way or the other, but I do think it would be nice to make some kind of change here.

What do we think about renaming `isRValue()` to `isPRValue()` and renaming `VK_RValue` to `VK_PRValue`, adding a "real" `isRValue()`, and then performing this cleanup? I think the current state of treating "rvalue" as sometimes meaning rvalue and sometimes meaning "prvalue" is unhelpful and confusing, and this change makes it worse because `isRValue` *could* be checking for an rvalue whereas a comparison against `VK_RValue` more clearly is only looking for one specific value category rather than two.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100733



More information about the cfe-commits mailing list