Skip to content

[HLSL][clang-format] Add Language Mode for HLSL #126257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Tracked by #11 ...
V-FEXrt opened this issue Feb 7, 2025 · 1 comment
Open
Tracked by #11 ...

[HLSL][clang-format] Add Language Mode for HLSL #126257

V-FEXrt opened this issue Feb 7, 2025 · 1 comment
Assignees
Labels
clang-format HLSL HLSL Language Support

Comments

@V-FEXrt
Copy link
Contributor

V-FEXrt commented Feb 7, 2025

clang-format supports many different languages and as part of that support it can switch between different languages to add/remove formatting rules. Right now clang-format can fairly reasonably format HLSL running under C++ mode however annotation syntax could use better support.

Adding an HLSL mode is the first step in supporting HLSL specific formatting rules.

Automatically determining HLSL as the source language is a downstream task that may or may not actually be possible. Plenty of HLSL programs will not have obvious differences from C++ so autodetection may have to be limited to huristics or file extension. This is still an open design question.

AC:

  • A test in the flavor of this one verifies language mode is HLSL
@V-FEXrt V-FEXrt added clang-format HLSL HLSL Language Support labels Feb 7, 2025
@V-FEXrt V-FEXrt self-assigned this Feb 7, 2025
@llvmbot
Copy link
Member

llvmbot commented Feb 7, 2025

@llvm/issue-subscribers-clang-format

Author: Ashley Coleman (V-FEXrt)

clang-format supports many different languages and as part of that support it can switch between different languages to add/remove formatting rules. Right now clang-format can fairly reasonably format HLSL running under C++ mode however annotation syntax could use better support.

Adding an HLSL mode is the first step in supporting HLSL specific formatting rules.

Automatically determining HLSL as the source language is a downstream task that may or may not actually be possible. Plenty of HLSL programs will not have obvious differences from C++ so autodetection may have to be limited to huristics or file extension. This is still an open design question.

AC:

  • A test in the flavor of this one verifies language mode is HLSL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang-format HLSL HLSL Language Support
Projects
Status: No status
Development

No branches or pull requests

2 participants