[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
Tue Jan 10 05:32:18 PST 2023


v1nh1shungry added a comment.

> About my template example: I wanted to say that the actual bugprone-implicit-widening-of-multiplication-result rule looks to not analyze template calculation problem. So I think it's better to use the desugared type (size_t).

Hmm, I don't think this two are related.

> It's not acceptable (IMHO) that the hard-coded size_t is resolved as long. According to https://en.cppreference.com/w/cpp/language/types long may be 32 bits.

Yeah, I don't have a good feeling about it too. The point is that we love desugaring `size_type` to `size_t` (which I haven't found a way to achieve yet), and hate desugaring `int64_t` to `long`, but how can we classify them? They BOTH are the desugared type.

According to the conversation above, I'd use the qualified alias type name.


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