Skip to content

Commit 478ef94

Browse files
committed
clang-format
1 parent 390a4c7 commit 478ef94

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

clang/lib/Headers/hlsl/hlsl_intrinsic_helpers.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ constexpr vector<T, L> refract_vec_impl(vector<T, L> I, vector<T, L> N, T Eta) {
8888
#endif
8989
}
9090

91-
9291
template <typename T> constexpr T fmod_impl(T X, T Y) {
9392
#if !defined(__DIRECTX__)
9493
return __builtin_elementwise_fmod(X, Y);

clang/lib/Sema/SemaSPIRV.cpp

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,14 @@ namespace clang {
2929

3030
SemaSPIRV::SemaSPIRV(Sema &S) : SemaBase(S) {}
3131

32-
/// Checks if the first `NumArgsToCheck` arguments of a function call are of vector type.
33-
/// If any of the arguments is not a vector type, it emits a diagnostic error and returns `true`.
34-
/// Otherwise, it returns `false`.
32+
/// Checks if the first `NumArgsToCheck` arguments of a function call are of
33+
/// vector type. If any of the arguments is not a vector type, it emits a
34+
/// diagnostic error and returns `true`. Otherwise, it returns `false`.
3535
///
3636
/// \param TheCall The function call expression to check.
3737
/// \param NumArgsToCheck The number of arguments to check for vector type.
38-
/// \return `true` if any of the arguments is not a vector type, `false` otherwise.
38+
/// \return `true` if any of the arguments is not a vector type, `false`
39+
/// otherwise.
3940

4041
bool SemaSPIRV::CheckVectorArgs(CallExpr *TheCall, unsigned NumArgsToCheck) {
4142
for (unsigned i = 0; i < NumArgsToCheck; ++i) {
@@ -187,7 +188,8 @@ bool SemaSPIRV::CheckSPIRVBuiltinFunctionCall(const TargetInfo &TI,
187188
if (CheckVectorArgs(TheCall, 2))
188189
return true;
189190

190-
QualType RetTy = TheCall->getArg(0)->getType()->getAs<VectorType>()->getElementType();
191+
QualType RetTy =
192+
TheCall->getArg(0)->getType()->getAs<VectorType>()->getElementType();
191193
TheCall->setType(RetTy);
192194
break;
193195
}
@@ -199,7 +201,8 @@ bool SemaSPIRV::CheckSPIRVBuiltinFunctionCall(const TargetInfo &TI,
199201
if (CheckVectorArgs(TheCall, 1))
200202
return true;
201203

202-
QualType RetTy = TheCall->getArg(0)->getType()->getAs<VectorType>()->getElementType();
204+
QualType RetTy =
205+
TheCall->getArg(0)->getType()->getAs<VectorType>()->getElementType();
203206
TheCall->setType(RetTy);
204207
break;
205208
}
@@ -215,8 +218,7 @@ bool SemaSPIRV::CheckSPIRVBuiltinFunctionCall(const TargetInfo &TI,
215218
QualType ArgTyC = C.get()->getType();
216219
if (!ArgTyC->isFloatingType()) {
217220
SemaRef.Diag(C.get()->getBeginLoc(), diag::err_builtin_invalid_arg_type)
218-
<< 3 << /* scalar*/ 5 << /* no int */ 0 << /* fp */ 1
219-
<< ArgTyC;
221+
<< 3 << /* scalar*/ 5 << /* no int */ 0 << /* fp */ 1 << ArgTyC;
220222
return true;
221223
}
222224

0 commit comments

Comments
 (0)