[clang] [llvm] [HLSL] Add matrix support to atan2 (PR #194984)
via cfe-commits
cfe-commits at lists.llvm.org
Thu May 7 18:51:17 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions h,cpp -- clang/lib/Headers/hlsl/hlsl_compat_overloads.h clang/lib/Sema/SemaHLSL.cpp llvm/lib/Target/SPIRV/SPIRVLegalizerInfo.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Sema/SemaHLSL.cpp b/clang/lib/Sema/SemaHLSL.cpp
index 45134197e..99467ae00 100644
--- a/clang/lib/Sema/SemaHLSL.cpp
+++ b/clang/lib/Sema/SemaHLSL.cpp
@@ -3295,11 +3295,11 @@ static bool CheckFloatOrHalfRepresentation(Sema *S, SourceLocation Loc,
clang::QualType PassedType) {
clang::QualType BaseType = PassedType;
if (const auto *VT = PassedType->getAs<clang::VectorType>()) {
- BaseType = VT->getElementType();
+ BaseType = VT->getElementType();
} else {
- const auto *MT = PassedType->getAs<clang::MatrixType>()
- assert(MT && "expected to be Vector or MatrixType");
- BaseType = MT->getElementType();
+ const auto *MT = PassedType->getAs<clang::MatrixType>()
+ assert(MT && "expected to be Vector or MatrixType");
+ BaseType = MT->getElementType();
}
if (!BaseType->isHalfType() && !BaseType->isFloat32Type())
``````````
</details>
https://github.com/llvm/llvm-project/pull/194984
More information about the cfe-commits
mailing list