Skip to content

Commit 9db0556

Browse files
committed
Clang format
1 parent fa895f7 commit 9db0556

2 files changed

Lines changed: 14 additions & 9 deletions

File tree

tools/clang/lib/Sema/SemaHLSL.cpp

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5537,7 +5537,8 @@ class HLSLExternalSource : public ExternalSemaSource {
55375537

55385538
if (ContainsLongVector(argType)) {
55395539
m_sema->Diag(argSrcLoc, diag::err_hlsl_unsupported_long_vector)
5540-
<< static_cast<unsigned>(TypeDiagContext::ConstantBuffersOrTextureBuffers);
5540+
<< static_cast<unsigned>(
5541+
TypeDiagContext::ConstantBuffersOrTextureBuffers);
55415542
return true;
55425543
}
55435544
if (DiagnoseTypeElements(
@@ -10806,7 +10807,8 @@ bool DiagnoseIntersectionAttributes(Sema &S, SourceLocation Loc, QualType Ty) {
1080610807
}
1080710808

1080810809
if (ContainsLongVector(Ty)) {
10809-
S.Diag(Loc, diag::err_hlsl_unsupported_long_vector) << static_cast<unsigned>(TypeDiagContext::Attributes);
10810+
S.Diag(Loc, diag::err_hlsl_unsupported_long_vector)
10811+
<< static_cast<unsigned>(TypeDiagContext::Attributes);
1081010812
return false;
1081110813
}
1081210814
return true;
@@ -12166,11 +12168,12 @@ static bool AllowObjectInContext(QualType Ty, TypeDiagContext DiagContext) {
1216612168
return true;
1216712169
}
1216812170

12169-
// Determine if `Ty` is valid in this `DiagContext` and/or an empty type. If invalid returns false and Sema `S`, location `Loc`,
12170-
// error index `DiagContext`, and FieldDecl `FD` are used to emit diagnostics.
12171-
// If `CheckLongVec` is set, errors are produced if `Ty` is a long vector.
12172-
// If the type is not empty, `Empty` is set to false.
12173-
// `CheckedDecls` is used to prevent redundant recursive type checks.
12171+
// Determine if `Ty` is valid in this `DiagContext` and/or an empty type. If
12172+
// invalid returns false and Sema `S`, location `Loc`, error index
12173+
// `DiagContext`, and FieldDecl `FD` are used to emit diagnostics. If
12174+
// `CheckLongVec` is set, errors are produced if `Ty` is a long vector. If the
12175+
// type is not empty, `Empty` is set to false. `CheckedDecls` is used to prevent
12176+
// redundant recursive type checks.
1217412177
static bool
1217512178
DiagnoseElementTypes(Sema &S, SourceLocation Loc, QualType Ty, bool &Empty,
1217612179
bool CheckLongVec, TypeDiagContext DiagContext,

tools/clang/lib/Sema/SemaHLSLDiagnoseTU.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -713,15 +713,17 @@ void hlsl::DiagnoseTranslationUnit(clang::Sema *self) {
713713
if (ContainsLongVector(param->getType()))
714714
self->Diag(param->getLocation(),
715715
diag::err_hlsl_unsupported_long_vector)
716-
<< static_cast<unsigned>(TypeDiagContext::PatchConstantFunctionParameters);
716+
<< static_cast<unsigned>(
717+
TypeDiagContext::PatchConstantFunctionParameters);
717718
DiagnoseTypeElements(*self, param->getLocation(), param->getType(),
718719
TypeDiagContext::PatchConstantFunctionParameters);
719720
}
720721

721722
if (ContainsLongVector(pPatchFnDecl->getReturnType())) {
722723
self->Diag(pPatchFnDecl->getLocation(),
723724
diag::err_hlsl_unsupported_long_vector)
724-
<< static_cast<unsigned>(TypeDiagContext::PatchConstantFunctionReturnType);
725+
<< static_cast<unsigned>(
726+
TypeDiagContext::PatchConstantFunctionReturnType);
725727
}
726728
DiagnoseTypeElements(*self, pPatchFnDecl->getLocation(),
727729
pPatchFnDecl->getReturnType(),

0 commit comments

Comments
 (0)