[clang] [HLSL] Rework implicit conversion sequences (PR #96011)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 12 15:29:27 PDT 2024
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 2ad7b4af95bc333d8f216915cd1b9d688590dcc5 84c6a2c9dea0d964db68b282b0236783a46ee292 --extensions cpp,h -- clang/include/clang/Sema/Overload.h clang/lib/Sema/SemaExprCXX.cpp clang/lib/Sema/SemaOverload.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp
index d75a0c9e1f..ceaf68176a 100644
--- a/clang/lib/Sema/SemaExprCXX.cpp
+++ b/clang/lib/Sema/SemaExprCXX.cpp
@@ -4660,8 +4660,8 @@ Sema::PerformImplicitConversion(Expr *From, QualType ToType,
ElTy = FromType->castAs<VectorType>()->getElementType();
}
- From = ImpCastExprToType(From, StepTy,
- ScalarTypeToBooleanCastKind(ElTy), VK_PRValue,
+ From = ImpCastExprToType(From, StepTy, ScalarTypeToBooleanCastKind(ElTy),
+ VK_PRValue,
/*BasePath=*/nullptr, CCK)
.get();
break;
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp
index 6118f0c0df..d4a48858ec 100644
--- a/clang/lib/Sema/SemaOverload.cpp
+++ b/clang/lib/Sema/SemaOverload.cpp
@@ -183,7 +183,7 @@ clang::GetDimensionConversionRank(ImplicitConversionRank Base,
return ICR_HLSL_Scalar_Widening_Conversion;
}
if (Rank == ICR_HLSL_Dimension_Reduction) {
- if(Base == ICR_Promotion)
+ if (Base == ICR_Promotion)
return ICR_HLSL_Dimension_Reduction_Promotion;
if (Base == ICR_Conversion)
return ICR_HLSL_Dimension_Reduction_Conversion;
``````````
</details>
https://github.com/llvm/llvm-project/pull/96011
More information about the cfe-commits
mailing list