Issue 83348
Summary [HLSL] Handle HLSL semantic attribute syntax in clang-format
Labels HLSL
Assignees
Reporter bogner
    HLSL semantics, like SV_GroupIndex below, are delineated by a colon and aren't recognized by clang-format. This can cause line breaking to be funny when this shows up on a long line, for example:
```hlsl
void aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
 bbbbbbbbbbbbbbbbbbbbbbb
    : SV_GroupIndex) {}
```
here clang-format breaks up the variable name and the semantic for some reason.

We should update clang-format to handle these constructs for HLSL. This may mean we need to add HLSL as an explicitly recognized language, or it may be possible with out that, I'm not sure.

AC:
- clang-format formats HLSL semantics reasonably
- test cases showing what clang-format does for a variety of cases involving HLSL semantics
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to