sepavloff added a comment.

In D103395#3105677 <https://reviews.llvm.org/D103395#3105677>, @tambre wrote:

> In D103395#3105668 <https://reviews.llvm.org/D103395#3105668>, @sepavloff 
> wrote:
>
>> Strange, I see that it cannot be compiled neither by gcc nor by clang: 
>> https://godbolt.org/z/1dY9Gs6zM. Do I miss something?
>
> Sorry, should've been more specific. Try in C++20 mode: 
> https://godbolt.org/z/4v8b3nsET
> I think the difference might be due to P1331R2 
> <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1331r2.pdf>, but 
> I'm not sure.

Thank you for this helpful test. I used a bit more accurate use of LHS 
expression and the issue seems resolved.

The new variant uses slightly more careful LHS expression tracking. Previously 
the expression was assigned only once. Now if the expression for LValue can be 
determined, it is updated. Only if the LValue starts to track non-expression 
entities, LHS expression is frozen to the last seen value. It does not affect 
the evaluation of active union member though.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103395

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

Reply via email to