Skip to content

Commit

Permalink
Make clang-format happy (#6177)
Browse files Browse the repository at this point in the history
The build is failing due to clang-format modifying these lines. I've
changed them to what clang-format wants even though it's a bit odd, and
updated the CMake script to make the error message more clear when this
type of failure occurs.
  • Loading branch information
sudonatalie authored Jan 22, 2024
1 parent f9535a7 commit 5ed628d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion cmake/modules/HCT.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ function(add_hlsl_hctgen mode)
COMMENT "Updating ${ARG_OUTPUT}..."
)
endif()
add_custom_target(${mode} ${verification} DEPENDS ${output})

add_custom_target(${mode}
COMMAND ${verification}
DEPENDS ${output}
COMMENT "Verifying clang-format results...")

add_dependencies(HCTGen ${mode})
endfunction()
4 changes: 2 additions & 2 deletions lib/DXIL/DxilShaderModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ const ShaderModel *ShaderModel::GetByName(llvm::StringRef Name) {
case '1':
Minor = 1;
break;
// clang-format off
// clang-format off
// Python lines need to be not formatted.
/* <py::lines('VALRULE-TEXT')>hctdb_instrhelp.get_shader_model_by_name()</py>*/
// clang-format on
Expand Down Expand Up @@ -369,7 +369,7 @@ void ShaderModel::GetMinValidatorVersion(unsigned &ValMajor,
DXASSERT(IsValidForDxil(), "invalid shader model");
ValMajor = 1;
switch (m_Minor) {
// clang-format off
// clang-format off
// Python lines need to be not formatted.
/* <py::lines('VALRULE-TEXT')>hctdb_instrhelp.get_min_validator_version()</py>*/
// clang-format on
Expand Down

0 comments on commit 5ed628d

Please sign in to comment.