[PATCH] D52730: [analyzer] ConversionChecker: handle floating point

DonĂ¡t Nagy via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 2 05:54:07 PDT 2018


donat.nagy marked 6 inline comments as done.
donat.nagy added inline comments.


================
Comment at: lib/StaticAnalyzer/Checkers/ConversionChecker.cpp:175
+
+  if (RepresentsUntilExp >= sizeof(unsigned long long)*8) {
     return false;
----------------
NoQ wrote:
> Szelethus wrote:
> > Szelethus wrote:
> > > How about `AC.getSizeType(AC.UnsignedLongLongTy))`?
> > I'm actually not too sure about this. @whisperity?
> Yeah, i suspect it's a host machine check (to prevent our own overflow on line 189) rather than a target machine check.
Yes, this is intended to be a host machine check (corresponding to the `W >= 64U` in the old version). I will add a comment to clarify this.


Repository:
  rC Clang

https://reviews.llvm.org/D52730





More information about the cfe-commits mailing list