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: >
1616 performance-*,
1717 -performance-enum-size,
1818 -performance-no-int-to-ptr,
19- -performance-type-promotion-in-math-fn,
2019 -performance-unnecessary-value-param,
2120 readability-*,
2221 -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) {
7676 CharUnits CurrSize = Result.Context ->getASTRecordLayout (Struct).getSize ();
7777 CharUnits MinByteSize =
7878 CharUnits::fromQuantity (std::max<clang::CharUnits::QuantityType>(
79- ceil (static_cast <float >(TotalBitSize) / CharSize), 1 ));
79+ std:: ceil (static_cast <float >(TotalBitSize) / CharSize), 1 ));
8080 CharUnits MaxAlign = CharUnits::fromQuantity (
81- ceil ((float )Struct->getMaxAlignment () / CharSize));
81+ std:: ceil ((float )Struct->getMaxAlignment () / CharSize));
8282 CharUnits CurrAlign =
8383 Result.Context ->getASTRecordLayout (Struct).getAlignment ();
8484 CharUnits NewAlign = computeRecommendedAlignment (MinByteSize);
Original file line number Diff line number Diff line change @@ -208,18 +208,20 @@ bool UnrollLoopsCheck::hasLargeNumIterations(const Stmt *Statement,
208208 return true ;
209209 switch (Op->getOpcode ()) {
210210 case (BO_AddAssign):
211- Iterations = ceil (float (EndValue - InitValue) / ConstantValue);
211+ Iterations = std:: ceil (float (EndValue - InitValue) / ConstantValue);
212212 break ;
213213 case (BO_SubAssign):
214- Iterations = ceil (float (InitValue - EndValue) / ConstantValue);
214+ Iterations = std:: ceil (float (InitValue - EndValue) / ConstantValue);
215215 break ;
216216 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);
219220 break ;
220221 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);
223225 break ;
224226 default :
225227 // All other operators are not handled; assume large bounds.
You can’t perform that action at this time.
0 commit comments