[all-commits] [llvm/llvm-project] 7c16a3: Address a handful of C4146 compiler warnings where...

Alex Sepkowski via All-commits all-commits at lists.llvm.org
Wed Jul 9 16:13:50 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7c16a31aa593b9cc750e61b260c27ade74edb1dd
      https://github.com/llvm/llvm-project/commit/7c16a31aa593b9cc750e61b260c27ade74edb1dd
  Author: Alex Sepkowski <alexsepkowski at gmail.com>
  Date:   2025-07-09 (Wed, 09 Jul 2025)

  Changed paths:
    M clang/lib/AST/ExprConstant.cpp
    M clang/lib/Format/Format.cpp
    M clang/lib/Lex/Lexer.cpp
    M clang/lib/Sema/SemaExpr.cpp

  Log Message:
  -----------
  Address a handful of C4146 compiler warnings where literals can be replaced with std::numeric_limits (#147623)

This PR addresses instances of compiler warning C4146 that can be
replaced with std::numeric_limits. Specifically, these are cases where a
literal such as '-1ULL' was used to assign a value to a uint64_t
variable. The intent is much cleaner if we use the appropriate
std::numeric_limits value<Type>::max() for these cases.


Addresses #147439



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list