Skip to content

Commit 1769e03

Browse files
committed
run formatter
Signed-off-by: Justin Stitt <[email protected]>
1 parent 3fcb27c commit 1769e03

File tree

7 files changed

+28
-24
lines changed

7 files changed

+28
-24
lines changed

clang/include/clang/AST/ASTContext.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2659,7 +2659,8 @@ class ASTContext : public RefCountedBase<ASTContext> {
26592659
};
26602660

26612661
/// Check overflow behavior type compatibility for assignments.
2662-
/// Returns detailed information about OBT compatibility for assignment checking.
2662+
/// Returns detailed information about OBT compatibility for assignment
2663+
/// checking.
26632664
OBTAssignResult checkOBTAssignmentCompatibility(QualType LHS, QualType RHS);
26642665

26652666
/// Return true if the given types are an RISC-V vector builtin type and a

clang/include/clang/Basic/DiagnosticGroups.td

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@ def ImplicitOverflowBehaviorConversionAssignmentPedantic
138138
def ImplicitOverflowBehaviorConversionAtFunctionBoundary
139139
: DiagGroup<"implicit-overflow-behavior-conversion-function-boundary">;
140140
def ImplicitOverflowBehaviorConversionAtFunctionBoundaryPedantic
141-
: DiagGroup<"implicit-overflow-behavior-conversion-function-boundary-pedantic">;
141+
: DiagGroup<
142+
"implicit-overflow-behavior-conversion-function-boundary-pedantic">;
142143
def ImplicitOverflowBehaviorConversionPedantic
143144
: DiagGroup<"implicit-overflow-behavior-conversion-pedantic">;
144145
def ImplicitOverflowBehaviorConversion

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9211,20 +9211,21 @@ def ext_typecheck_convert_discards_qualifiers : ExtWarn<
92119211
"|%diff{casting $ to type $|casting between types}0,1}2"
92129212
" discards qualifiers">,
92139213
InGroup<IncompatiblePointerTypesDiscardsQualifiers>;
9214-
def ext_typecheck_convert_discards_overflow_behavior : ExtWarn<
9215-
"%select{%diff{assigning to $ from $|assigning to different types}0,1"
9216-
"|%diff{passing $ to parameter of type $|"
9217-
"passing to parameter of different type}0,1"
9218-
"|%diff{returning $ from a function with result type $|"
9219-
"returning from function with different return type}0,1"
9220-
"|%diff{converting $ to type $|converting between types}0,1"
9221-
"|%diff{initializing $ with an expression of type $|"
9222-
"initializing with expression of different type}0,1"
9223-
"|%diff{sending $ to parameter of type $|"
9224-
"sending to parameter of different type}0,1"
9225-
"|%diff{casting $ to type $|casting between types}0,1}2"
9226-
" discards overflow behavior">,
9227-
InGroup<IncompatiblePointerTypesDiscardsOverflowBehavior>;
9214+
def ext_typecheck_convert_discards_overflow_behavior
9215+
: ExtWarn<
9216+
"%select{%diff{assigning to $ from $|assigning to different types}0,1"
9217+
"|%diff{passing $ to parameter of type $|"
9218+
"passing to parameter of different type}0,1"
9219+
"|%diff{returning $ from a function with result type $|"
9220+
"returning from function with different return type}0,1"
9221+
"|%diff{converting $ to type $|converting between types}0,1"
9222+
"|%diff{initializing $ with an expression of type $|"
9223+
"initializing with expression of different type}0,1"
9224+
"|%diff{sending $ to parameter of type $|"
9225+
"sending to parameter of different type}0,1"
9226+
"|%diff{casting $ to type $|casting between types}0,1}2"
9227+
" discards overflow behavior">,
9228+
InGroup<IncompatiblePointerTypesDiscardsOverflowBehavior>;
92289229
def err_typecheck_convert_discards_qualifiers : Error<
92299230
"%select{%diff{assigning to $ from $|assigning to different types}0,1"
92309231
"|%diff{passing $ to parameter of type $|"

clang/lib/CodeGen/CGExprScalar.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1803,16 +1803,17 @@ Value *ScalarExprEmitter::EmitScalarConversion(Value *Src, QualType SrcType,
18031803
// capability checks as this overflow behavior kind is also capable of
18041804
// emitting traps without runtime sanitizer support.
18051805
// Also skip instrumentation if either source or destination has 'wrap'
1806-
// behavior - the user has explicitly indicated they accept wrapping semantics.
1807-
// Use non-canonical types to preserve OBT annotations.
1806+
// behavior - the user has explicitly indicated they accept wrapping
1807+
// semantics. Use non-canonical types to preserve OBT annotations.
18081808
const auto *DstOBT = NoncanonicalDstType->getAs<OverflowBehaviorType>();
18091809
const auto *SrcOBT = NoncanonicalSrcType->getAs<OverflowBehaviorType>();
18101810
bool OBTrapInvolved =
18111811
(DstOBT && DstOBT->isTrapKind()) || (SrcOBT && SrcOBT->isTrapKind());
18121812
bool OBWrapInvolved =
18131813
(DstOBT && DstOBT->isWrapKind()) || (SrcOBT && SrcOBT->isWrapKind());
18141814

1815-
if ((Opts.EmitImplicitIntegerTruncationChecks || OBTrapInvolved) && !OBWrapInvolved)
1815+
if ((Opts.EmitImplicitIntegerTruncationChecks || OBTrapInvolved) &&
1816+
!OBWrapInvolved)
18161817
EmitIntegerTruncationCheck(Src, NoncanonicalSrcType, Res,
18171818
NoncanonicalDstType, Loc, OBTrapInvolved);
18181819

clang/lib/Sema/Sema.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,8 @@ ExprResult Sema::ImpCastExprToType(Expr *E, QualType Ty,
849849
isa<CXXFunctionalCastExpr>(E);
850850

851851
if ((Kind == CK_IntegralCast || Kind == CK_IntegralToBoolean ||
852-
(Kind == CK_NoOp && E->getType()->isIntegerType() && Ty->isIntegerType())) &&
852+
(Kind == CK_NoOp && E->getType()->isIntegerType() &&
853+
Ty->isIntegerType())) &&
853854
IsExplicitCast) {
854855
if (const auto *SourceOBT = E->getType()->getAs<OverflowBehaviorType>()) {
855856
if (Ty->isIntegerType() && !Ty->isOverflowBehaviorType()) {

clang/lib/Sema/SemaExprCXX.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4685,8 +4685,8 @@ static QualType adjustVectorType(ASTContext &Context, QualType FromTy,
46854685
return Context.getExtVectorType(ElType, FromVec->getNumElements());
46864686
}
46874687

4688-
/// Check if an integral conversion involves incompatible overflow behavior types.
4689-
/// Returns true if the conversion is invalid.
4688+
/// Check if an integral conversion involves incompatible overflow behavior
4689+
/// types. Returns true if the conversion is invalid.
46904690
static bool checkIncompatibleOBTConversion(Sema &S, QualType FromType,
46914691
QualType ToType, Expr *From) {
46924692
const auto *FromOBT = FromType->getAs<OverflowBehaviorType>();

clang/lib/Sema/SemaOverload.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2874,8 +2874,7 @@ bool Sema::IsOverflowBehaviorTypeConversion(QualType FromType,
28742874
if (FromType->isOverflowBehaviorType() && !ToType->isOverflowBehaviorType()) {
28752875
// Don't allow implicit conversion from OverflowBehaviorType to scoped enum
28762876
if (const EnumType *ToEnumType = ToType->getAs<EnumType>()) {
2877-
const EnumDecl *ToED =
2878-
ToEnumType->getDecl()->getDefinitionOrSelf();
2877+
const EnumDecl *ToED = ToEnumType->getDecl()->getDefinitionOrSelf();
28792878
if (ToED->isScoped())
28802879
return false;
28812880
}

0 commit comments

Comments
 (0)