Skip to content

Update clang-format to handle [unroll] when editing HLSL #122317

Open
@farzonl

Description

@farzonl

clang-format doesn't seem to handle [unroll], but this should probably be one of:

  [unroll]
  for (int i = 1; i < N; ++i)
    XSquaredSum += XSquared[i];

or

  [unroll] for (int i = 1; i < N; ++i)
    XSquaredSum += XSquared[i];

The latter is closer to what clang-format does with [[unroll]] instead of [unroll] to trick it into seeing that as an attribute.

Originally posted by @bogner in #121611 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions