[clang] [NFC][SemaHLSL] Fix typo causing float to double conversion (PR #148941)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 15 12:37:50 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Finn Plummer (inbelic)
<details>
<summary>Changes</summary>
- it was noted, [here](https://github.com/llvm/llvm-project/pull/145795#discussion_r2208118547), that by accidently not specifying this explicitly as a float it will cause a build warning on MSVC
- this commit resolves this by explicitly specifying it as a float
---
Full diff: https://github.com/llvm/llvm-project/pull/148941.diff
1 Files Affected:
- (modified) clang/lib/Sema/SemaHLSL.cpp (+1-1)
``````````diff
diff --git a/clang/lib/Sema/SemaHLSL.cpp b/clang/lib/Sema/SemaHLSL.cpp
index 4875c25c76988..9276554bebf9d 100644
--- a/clang/lib/Sema/SemaHLSL.cpp
+++ b/clang/lib/Sema/SemaHLSL.cpp
@@ -1150,7 +1150,7 @@ bool SemaHLSL::handleRootSignatureElements(
if (!llvm::hlsl::rootsig::verifyMaxAnisotropy(Sampler->MaxAnisotropy))
ReportError(Loc, 0, 16);
if (!llvm::hlsl::rootsig::verifyMipLODBias(Sampler->MipLODBias))
- ReportFloatError(Loc, -16.f, 15.99);
+ ReportFloatError(Loc, -16.f, 15.99f);
} else if (const auto *Clause =
std::get_if<llvm::hlsl::rootsig::DescriptorTableClause>(
&Elem)) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/148941
More information about the cfe-commits
mailing list