[PATCH] D141058: [clang-tidy] fix wrong fixup for bugprone-implicit-widening-of-multiplication-result

Vincent Hong via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 9 03:24:24 PST 2023


v1nh1shungry added a comment.

> There are two approaches to fixing this issue. One is fixing with the FULLY qualified type name, in the above case that is, std::vector<int, std::allocator<int>>::size_type. Another one is fixing with the desugared type name, that is, unsigned long. I personally don't have a strong opinion on which one is better.

IMHO, the first approach can cause redundancy in some cases, like this one. The second one will turn `int64_t` into `long`, which I don't have a good feeling about.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141058



More information about the cfe-commits mailing list