Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[HLSL] Missing LValue to RValue cast in implicit cast for HLSLAggregateSplatCast #163593

Copy link
Copy link
@spall

Description

@spall
Issue body actions

HLSLAggregateSplatCast should always contain an lvalue to rvalue cast.

int1 A = {1};
int4 B = (int4)A;

In this example there is a missing LValue to RValue cast, so the truncation is resulting in an LValue. But before the HLSLVectorTruncation there should be an LValue to RValue cast.

-CStyleCastExpr 0x193fb1c0 <col:15, col:23> 'float4':'vector<float, 4>' <HLSLAggregateSplatCast>
  |     `-ImplicitCastExpr 0x193fb1a8 <col:23> 'float' lvalue <HLSLVectorTruncation> part_of_explicit_cast
  |       `-DeclRefExpr 0x193fb170 <col:23> 'float1':'vector<float, 1>' lvalue ParmVar 0x193faec8 'I4' 'float1':'vector<float, 1>'

Metadata

Metadata

Assignees

Labels

HLSLHLSL Language SupportHLSL Language Supportclang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"

Type

Projects

Status

Closed
Show more project fields

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.