File tree Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ Checks: >
16
16
performance-*,
17
17
-performance-enum-size,
18
18
-performance-no-int-to-ptr,
19
- -performance-type-promotion-in-math-fn,
20
19
-performance-unnecessary-value-param,
21
20
readability-*,
22
21
-readability-avoid-nested-conditional-operator,
Original file line number Diff line number Diff line change @@ -76,9 +76,9 @@ void StructPackAlignCheck::check(const MatchFinder::MatchResult &Result) {
76
76
CharUnits CurrSize = Result.Context ->getASTRecordLayout (Struct).getSize ();
77
77
CharUnits MinByteSize =
78
78
CharUnits::fromQuantity (std::max<clang::CharUnits::QuantityType>(
79
- ceil (static_cast <float >(TotalBitSize) / CharSize), 1 ));
79
+ std:: ceil (static_cast <float >(TotalBitSize) / CharSize), 1 ));
80
80
CharUnits MaxAlign = CharUnits::fromQuantity (
81
- ceil ((float )Struct->getMaxAlignment () / CharSize));
81
+ std:: ceil ((float )Struct->getMaxAlignment () / CharSize));
82
82
CharUnits CurrAlign =
83
83
Result.Context ->getASTRecordLayout (Struct).getAlignment ();
84
84
CharUnits NewAlign = computeRecommendedAlignment (MinByteSize);
Original file line number Diff line number Diff line change @@ -208,18 +208,20 @@ bool UnrollLoopsCheck::hasLargeNumIterations(const Stmt *Statement,
208
208
return true ;
209
209
switch (Op->getOpcode ()) {
210
210
case (BO_AddAssign):
211
- Iterations = ceil (float (EndValue - InitValue) / ConstantValue);
211
+ Iterations = std:: ceil (float (EndValue - InitValue) / ConstantValue);
212
212
break ;
213
213
case (BO_SubAssign):
214
- Iterations = ceil (float (InitValue - EndValue) / ConstantValue);
214
+ Iterations = std:: ceil (float (InitValue - EndValue) / ConstantValue);
215
215
break ;
216
216
case (BO_MulAssign):
217
- Iterations = 1 + (log ((double )EndValue) - log ((double )InitValue)) /
218
- log ((double )ConstantValue);
217
+ Iterations =
218
+ 1 + (std::log ((double )EndValue) - std::log ((double )InitValue)) /
219
+ std::log ((double )ConstantValue);
219
220
break ;
220
221
case (BO_DivAssign):
221
- Iterations = 1 + (log ((double )InitValue) - log ((double )EndValue)) /
222
- log ((double )ConstantValue);
222
+ Iterations =
223
+ 1 + (std::log ((double )InitValue) - std::log ((double )EndValue)) /
224
+ std::log ((double )ConstantValue);
223
225
break ;
224
226
default :
225
227
// All other operators are not handled; assume large bounds.
You can’t perform that action at this time.
0 commit comments