[clang] [clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores unsigned consts (PR #101073)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 24 11:42:22 PDT 2024
================
@@ -88,13 +88,15 @@ void ImplicitWideningOfMultiplicationResultCheck::handleImplicitCastExpr(
// Is the expression a compile-time constexpr that we know can fit in the
// source type?
- if (IgnoreConstantIntExpr && ETy->isIntegerType() &&
- !ETy->isUnsignedIntegerType()) {
- if (const auto ConstExprResult = E->getIntegerConstantExpr(*Context)) {
+ if (IgnoreConstantIntExpr && ETy->isIntegerType()) {
+ if (const auto ConstExprResult =
----------------
EugeneZelenko wrote:
Please do not use `auto` when type is not explicitly stated in same statement or iterator. Same below.
https://github.com/llvm/llvm-project/pull/101073
More information about the cfe-commits
mailing list