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

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 14 09:24:35 PDT 2021


aaron.ballman added a reviewer: rsmith.
aaron.ballman added a comment.

In D100733#2759592 <https://reviews.llvm.org/D100733#2759592>, @aaronpuchert wrote:

> @aaron.ballman, what do you think about this? We can't really prevent anyone from writing `.getValueKind() == VK_*Value` instead of `.is*Value()`, so this change will make things consistent only for now.

I'm not certain this is a big win in all cases, especially because the standard has one set of terminology and we use another. e.g., the standard makes a distinction between rvalue and prvalue that we don't make, same for lvalue and glvalue. When I see the equality expression, I know that only one category is being tested, but when I see the function call expression, I have to think more about "does `isRValue()` return true for a prvalue and an xvalue, or just a prvalue?"


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