v1nh1shungry added a comment.

> Sorry, I'm confused. Could you please explain what you expect this example 
> should achieve and what is "the rule"? Thanks!

Ah, I think I understand it. You mean the 
`bugprone-implicit-widening-of-multiplication-result` check doesn't warn 
anything about this example, right?

If so, although I don't understand what you mean by coming up with this 
example, to classify, when I said

> The second one will turn int64_t into long, which I don't have a good feeling 
> about.

the point is that if we choose to use the desugared type,

  int64_t foobar() {
    return 1024 * 1024;
  }

will change to

  int64_t foobar() {
    return static_cast<long>(1024 * 1024);
                       ^^^^ instead of int64_t
  }

Here I think this will break the portability.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141058

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to