[PATCH] D157869: [clang-tidy] Avoid overflow when dumping unsigned integer values

Piotr Zegar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 14 07:51:57 PDT 2023


PiotrZSL added a comment.

This wont fix issue, simply because problem happen during reading -1, not during dumping, and per documentation -1 was a valid value. Same issue happen in other checks that use -1. Most probably best way would be to change those variables into std::int64_t, in C++ creating any structure of size above max int will fail with error anyway, so using signed i64 should be sufficient, and would also accept -1.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157869/new/

https://reviews.llvm.org/D157869



More information about the cfe-commits mailing list