[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 02:15:26 PST 2023


v1nh1shungry added a comment.

Thank you for taking a look at this patch! @bansan

> For the first test, I still think that the auto fix should be return static_cast<int64_t>(1024) * 1024 * 1024 * x; to have the good result.

I'd say I'm not the author of this checker. I think this behavior change needs a discussion somewhere, for example, you could raise an issue on GitHub. I just want to fix the wrong fix-hint and I think this is out of what this patch should do. Sorry!

> For the second test, the type is the internal type of std::vector.

Good catch, thanks! I didn't realize this problem. Will take a look at it.


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