Skip to content

Commit 2a0c5e3

Browse files
committed
fix style
1 parent 9e08ddf commit 2a0c5e3

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

clang/lib/AST/ByteCode/Interp.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2366,12 +2366,14 @@ static inline bool PtrPtrCast(InterpState &S, CodePtr OpPC, bool SrcIsVoidPtr) {
23662366
} else if (!S.getLangOpts().CPlusPlus26) {
23672367
const SourceInfo &E = S.Current->getSource(OpPC);
23682368
S.CCEDiag(E, diag::note_constexpr_invalid_cast)
2369-
<< diag::CastKind::CastFrom << "'void *'" << S.Current->getRange(OpPC);
2369+
<< diag::CastKind::CastFrom << "'void *'"
2370+
<< S.Current->getRange(OpPC);
23702371
}
23712372
} else {
23722373
const SourceInfo &E = S.Current->getSource(OpPC);
23732374
S.CCEDiag(E, diag::note_constexpr_invalid_cast)
2374-
<< diag::CastKind::ThisCastOrReinterpret << S.getLangOpts().CPlusPlus << S.Current->getRange(OpPC);
2375+
<< diag::CastKind::ThisCastOrReinterpret << S.getLangOpts().CPlusPlus
2376+
<< S.Current->getRange(OpPC);
23752377
}
23762378

23772379
return true;

clang/lib/AST/ExprConstant.cpp

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8103,7 +8103,8 @@ class ExprEvaluatorBase
81038103
}
81048104

81058105
bool VisitCXXReinterpretCastExpr(const CXXReinterpretCastExpr *E) {
8106-
CCEDiag(E, diag::note_constexpr_invalid_cast) << diag::CastKind::Reinterpret;
8106+
CCEDiag(E, diag::note_constexpr_invalid_cast)
8107+
<< diag::CastKind::Reinterpret;
81078108
return static_cast<Derived*>(this)->VisitCastExpr(E);
81088109
}
81098110
bool VisitCXXDynamicCastExpr(const CXXDynamicCastExpr *E) {
@@ -8833,7 +8834,8 @@ class LValueExprEvaluator
88338834

88348835
case CK_LValueBitCast:
88358836
this->CCEDiag(E, diag::note_constexpr_invalid_cast)
8836-
<< diag::CastKind::ThisCastOrReinterpret << Info.Ctx.getLangOpts().CPlusPlus;
8837+
<< diag::CastKind::ThisCastOrReinterpret
8838+
<< Info.Ctx.getLangOpts().CPlusPlus;
88378839
if (!Visit(E->getSubExpr()))
88388840
return false;
88398841
Result.Designator.setInvalid();
@@ -9673,7 +9675,8 @@ bool PointerExprEvaluator::VisitCastExpr(const CastExpr *E) {
96739675
<< diag::CastKind::CastFrom << SubExpr->getType();
96749676
} else
96759677
CCEDiag(E, diag::note_constexpr_invalid_cast)
9676-
<< diag::CastKind::ThisCastOrReinterpret << Info.Ctx.getLangOpts().CPlusPlus;
9678+
<< diag::CastKind::ThisCastOrReinterpret
9679+
<< Info.Ctx.getLangOpts().CPlusPlus;
96779680
Result.Designator.setInvalid();
96789681
}
96799682
}
@@ -9712,7 +9715,8 @@ bool PointerExprEvaluator::VisitCastExpr(const CastExpr *E) {
97129715

97139716
case CK_IntegralToPointer: {
97149717
CCEDiag(E, diag::note_constexpr_invalid_cast)
9715-
<< diag::CastKind::ThisCastOrReinterpret << Info.Ctx.getLangOpts().CPlusPlus;
9718+
<< diag::CastKind::ThisCastOrReinterpret
9719+
<< Info.Ctx.getLangOpts().CPlusPlus;
97169720

97179721
APValue Value;
97189722
if (!EvaluateIntegerOrLValue(SubExpr, Value, Info))
@@ -11177,7 +11181,8 @@ bool VectorExprEvaluator::VisitCastExpr(const CastExpr *E) {
1117711181
// Give up if the input isn't an int, float, or vector. For example, we
1117811182
// reject "(v4i16)(intptr_t)&a".
1117911183
Info.FFDiag(E, diag::note_constexpr_invalid_cast)
11180-
<< diag::CastKind::ThisCastOrReinterpret << Info.Ctx.getLangOpts().CPlusPlus;
11184+
<< diag::CastKind::ThisCastOrReinterpret
11185+
<< Info.Ctx.getLangOpts().CPlusPlus;
1118111186
return false;
1118211187
}
1118311188

@@ -15196,7 +15201,8 @@ bool IntExprEvaluator::VisitCastExpr(const CastExpr *E) {
1519615201

1519715202
case CK_PointerToIntegral: {
1519815203
CCEDiag(E, diag::note_constexpr_invalid_cast)
15199-
<< diag::CastKind::ThisCastOrReinterpret << Info.Ctx.getLangOpts().CPlusPlus << E->getSourceRange();
15204+
<< diag::CastKind::ThisCastOrReinterpret
15205+
<< Info.Ctx.getLangOpts().CPlusPlus << E->getSourceRange();
1520015206

1520115207
LValue LV;
1520215208
if (!EvaluatePointer(SubExpr, LV, Info))

0 commit comments

Comments
 (0)