Sarah Spall 1eebbb066a
[HLSL] Create XValue in HLSL list initialization if record is a prvalue (#186233)
In the case where the record in an Init List expression is a prvalue
create an xvalue so member accesses will be xvalues. This is in line
with the C++ specification. The Clang code which generates the member
field access however does not create an xvalue if the record is a
prvalue, so we make the record an xvalue here.

https://en.cppreference.com/w/cpp/language/value_category.html
```
is an xvalue expression: a.m, the member of object expression, where a is an rvalue and m is a non-static data member of an object type;
```

Adds Constant expression evaluation tests for Init list expressions
which contain a cast. This test file is currently XFAILed on issue
#188577
Closes #185911

---------

Co-authored-by: Deric C. <cheung.deric@gmail.com>
2026-03-26 11:48:07 -07:00
..