lebedev.ri added inline comments.

================
Comment at: 
clang-tools-extra/clang-tidy/bugprone/ImplicitWideningOfMultiplicationResultCheck.cpp:130
+  StringRef TyAsString =
+      IndexExprType->isSignedIntegerType() ? "ssize_t" : "size_t";
+
----------------
aaron.ballman wrote:
> aaron.ballman wrote:
> > One thing that's awkward about this is that there's no portable `ssize_t` 
> > type -- that's a POSIX type but it doesn't exist on all platforms (like 
> > Windows). We shouldn't print out a typecast that's going to cause compile 
> > errors, but we also shouldn't use the underlying type for `ssize_t` as that 
> > may be incorrect for other target architectures.
> I'm still not quite certain what to do about this. Would it make sense to use 
> the underlying type on platforms that don't have `ssize_t`? Relatedly, if 
> we're going to suggest this as a replacement, we should also insert an 
> include for the correct header file.
I've been thinking about this, and i really can't come up with a better fix 
than using `ptrdiff_t`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93822

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

Reply via email to