mizvekov marked an inline comment as done.
mizvekov added inline comments.

================
Comment at: clang/lib/Sema/SemaExprCXX.cpp:5662
   switch (ET) {
   case ET_IsLValueExpr: return E->isLValue();
+  case ET_IsRValueExpr:
----------------
rsmith wrote:
> Hm, I wonder if this it's correct that these both evaluate to false for an 
> xvalue. Does anyone have a copy of Embarcadero's 32-bit compiler to test with?
I tested, looks correct:

```
#include <cstdio>

#define TEST(E) printf(#E " rvalue:%d lvalue:%d\n", __is_rvalue_expr(E), 
__is_lvalue_expr(E))

int main() {
  TEST(1);

  int x;
  TEST(x);
  TEST(static_cast<int&&>(x));

  struct T { int m; };
  TEST(T{}.m);

  return 0;
}
```
```
bcc32c test.cpp
.\test.exe
```
```
1 rvalue:1 lvalue:0
x rvalue:0 lvalue:1
static_cast<int&&>(x) rvalue:0 lvalue:0
T{}.m rvalue:0 lvalue:0
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103720

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

Reply via email to