Skip to content

Commit ae0cf84

Browse files
committed
chore(style): fix code style
1 parent 3b793b2 commit ae0cf84

File tree

2 files changed

+16
-19
lines changed

2 files changed

+16
-19
lines changed

clang/lib/Frontend/InitPreprocessor.cpp

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ static void AddImplicitIncludePCH(MacroBuilder &Builder, Preprocessor &PP,
9595
/// specified FP model.
9696
template <typename T>
9797
static T PickFP(const llvm::fltSemantics *Sem, T IEEEHalfVal, T BFloatVal,
98-
T IEEESingleVal, T IEEEDoubleVal, T X87DoubleExtendedVal,
99-
T PPCDoubleDoubleVal, T IEEEQuadVal) {
98+
T IEEESingleVal, T IEEEDoubleVal, T X87DoubleExtendedVal,
99+
T PPCDoubleDoubleVal, T IEEEQuadVal) {
100100
if (Sem == (const llvm::fltSemantics*)&llvm::APFloat::IEEEhalf())
101101
return IEEEHalfVal;
102102
if (Sem == (const llvm::fltSemantics *)&llvm::APFloat::BFloat())
@@ -116,18 +116,16 @@ static T PickFP(const llvm::fltSemantics *Sem, T IEEEHalfVal, T BFloatVal,
116116
static void DefineFloatMacros(MacroBuilder &Builder, StringRef Prefix,
117117
const llvm::fltSemantics *Sem, StringRef Ext) {
118118
const char *DenormMin, *NormMax, *Epsilon, *Max, *Min;
119-
NormMax = PickFP(Sem, "6.5504e+4",
120-
"3.38953138925153547590470800371487867e+38",
121-
"3.40282347e+38",
122-
"1.7976931348623157e+308", "1.18973149535723176502e+4932",
123-
"8.98846567431157953864652595394501e+307",
124-
"1.18973149535723176508575932662800702e+4932");
125-
DenormMin = PickFP(Sem, "5.9604644775390625e-8",
126-
"9.18354961579912115600575419704879436e-41",
127-
"1.40129846e-45",
128-
"4.9406564584124654e-324", "3.64519953188247460253e-4951",
129-
"4.94065645841246544176568792868221e-324",
130-
"6.47517511943802511092443895822764655e-4966");
119+
NormMax = PickFP(
120+
Sem, "6.5504e+4", "3.38953138925153547590470800371487867e+38",
121+
"3.40282347e+38", "1.7976931348623157e+308",
122+
"1.18973149535723176502e+4932", "8.98846567431157953864652595394501e+307",
123+
"1.18973149535723176508575932662800702e+4932");
124+
DenormMin = PickFP(
125+
Sem, "5.9604644775390625e-8", "9.18354961579912115600575419704879436e-41",
126+
"1.40129846e-45", "4.9406564584124654e-324",
127+
"3.64519953188247460253e-4951", "4.94065645841246544176568792868221e-324",
128+
"6.47517511943802511092443895822764655e-4966");
131129
int Digits = PickFP(Sem, 3, 2, 6, 15, 18, 31, 33);
132130
int DecimalDigits = PickFP(Sem, 5, 4, 9, 17, 21, 33, 36);
133131
Epsilon = PickFP(Sem, "9.765625e-4", "7.8125e-3", "1.19209290e-7",
@@ -140,13 +138,11 @@ static void DefineFloatMacros(MacroBuilder &Builder, StringRef Prefix,
140138
int MinExp = PickFP(Sem, -13, -125, -125, -1021, -16381, -968, -16381);
141139
int MaxExp = PickFP(Sem, 16, 128, 128, 1024, 16384, 1024, 16384);
142140
Min = PickFP(Sem, "6.103515625e-5",
143-
"1.17549435082228750796873653722224568e-38",
144-
"1.17549435e-38",
141+
"1.17549435082228750796873653722224568e-38", "1.17549435e-38",
145142
"2.2250738585072014e-308", "3.36210314311209350626e-4932",
146143
"2.00416836000897277799610805135016e-292",
147144
"3.36210314311209350626267781732175260e-4932");
148-
Max = PickFP(Sem, "6.5504e+4",
149-
"3.38953138925153547590470800371487867e+38",
145+
Max = PickFP(Sem, "6.5504e+4", "3.38953138925153547590470800371487867e+38",
150146
"3.40282347e+38", "1.7976931348623157e+308",
151147
"1.18973149535723176502e+4932",
152148
"1.79769313486231580793728971405301e+308",

clang/lib/Lex/LiteralSupport.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -981,7 +981,8 @@ NumericLiteralParser::NumericLiteralParser(StringRef TokSpelling,
981981
switch (*s) {
982982
case 'b':
983983
case 'B':
984-
if (!isFPConstant) break; // Error for integer constant.
984+
if (!isFPConstant)
985+
break; // Error for integer constant.
985986
if (isBFloat16)
986987
break;
987988
if (!Target.hasBFloat16Type())

0 commit comments

Comments
 (0)