Skip to content

Commit 4f8d5f5

Browse files
committed
git-clang-format
Signed-off-by: Justin Stitt <[email protected]>
1 parent d80d76a commit 4f8d5f5

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

clang/lib/AST/ExprConstant.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2775,8 +2775,7 @@ static bool CheckedIntArithmetic(EvalInfo &Info, const Expr *E,
27752775
APSInt Value(Op(LHS.extend(BitWidth), RHS.extend(BitWidth)), false);
27762776
Result = Value.trunc(LHS.getBitWidth());
27772777
if (Result.extend(BitWidth) != Value) {
2778-
if (Info.checkingForUndefinedBehavior() &&
2779-
!E->getType().hasWrapsAttr())
2778+
if (Info.checkingForUndefinedBehavior() && !E->getType().hasWrapsAttr())
27802779
Info.Ctx.getDiagnostics().Report(E->getExprLoc(),
27812780
diag::warn_integer_constant_overflow)
27822781
<< toString(Result, 10, Result.isSigned(), /*formatAsCLiteral=*/false,
@@ -13994,8 +13993,7 @@ bool IntExprEvaluator::VisitUnaryOperator(const UnaryOperator *E) {
1399413993
if (!Result.isInt()) return Error(E);
1399513994
const APSInt &Value = Result.getInt();
1399613995
if (Value.isSigned() && Value.isMinSignedValue() && E->canOverflow()) {
13997-
if (Info.checkingForUndefinedBehavior() &&
13998-
!E->getType().hasWrapsAttr())
13996+
if (Info.checkingForUndefinedBehavior() && !E->getType().hasWrapsAttr())
1399913997
Info.Ctx.getDiagnostics().Report(E->getExprLoc(),
1400013998
diag::warn_integer_constant_overflow)
1400113999
<< toString(Value, 10, Value.isSigned(), /*formatAsCLiteral=*/false,

clang/lib/CodeGen/CGExprScalar.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,8 +1112,7 @@ void ScalarExprEmitter::EmitIntegerTruncationCheck(Value *Src, QualType SrcType,
11121112
// If the comparison result is 'i1 false', then the truncation was lossy.
11131113

11141114
// Do we care about this type of truncation?
1115-
if (!CGF.SanOpts.has(Check.second.second) ||
1116-
DstType.hasWrapsAttr())
1115+
if (!CGF.SanOpts.has(Check.second.second) || DstType.hasWrapsAttr())
11171116
return;
11181117

11191118
llvm::Constant *StaticArgs[] = {

clang/lib/Sema/SemaChecking.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16479,8 +16479,7 @@ static void CheckImplicitConversion(Sema &S, Expr *E, QualType T,
1647916479
S.Context, E, S.isConstantEvaluatedContext(), /*Approximate=*/true);
1648016480
IntRange TargetRange = IntRange::forTargetOfCanonicalType(S.Context, Target);
1648116481

16482-
if (LikelySourceRange.Width > TargetRange.Width &&
16483-
!T.hasWrapsAttr()) {
16482+
if (LikelySourceRange.Width > TargetRange.Width && !T.hasWrapsAttr()) {
1648416483
// If the source is a constant, use a default-on diagnostic.
1648516484
// TODO: this should happen for bitfield stores, too.
1648616485
Expr::EvalResult Result;

0 commit comments

Comments
 (0)