Skip to content

[HLSL] Initializer lists for incomplete arrays failing #132958

Closed
@llvm-beanz

Description

@llvm-beanz

Initialization of incomplete arrays fail because the size of the entity to initialize is undefined which trips over how we iterate the initializers. I need to create an alternate flow to support repeatedly iterating the dest types list to handle unknown array sizes.

Problematic code:

export void fn() {
    int2 Arr[] = {int2(0,1), int2(2,3), int2(4,5)};
}

Compiler Explorer

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

Status

Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions