Take these files for example:
shader.slang
[[SpecializationConstant]] const uint32_t MY_CONSTANT;
.clang-format
BreakAfterAttributes: Leave
Formatting the slang file with the Format Document action will format it to the following code instead of letting it as-is:
[[SpecializationConstant]]
const uint32_t MY_CONSTANT;
However, manually invoking clang-format with clang-format.exe shader.slang does not exhibit the same issue.