llvm / llvm/llvm-project

[HLSL] Invalid struct field definition not producing error.

Open
#161,565 0 comments 0 reactions 0 assignees View on GitHub
HLSL
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

This struct definition should produce an error:
```
struct MoreBFields {
uint : G;
};
```

It is suspected that the G is being parsed as a semantic.
https://godbolt.org/z/5PfKenYzG

Contributor guide

Open the contributing guide

Research direction

Start with the HLSL struct reproducer shown in the issue and compare its behavior with the linked Godbolt example. Trace how `uint : G;` is parsed, with the suspected semantic interpretation in mind; done means this invalid struct field produces an error.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.