Szelethus 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.
Oh right, thanks for clarifying that.
I looked it up, and the number of bits in a `char` can be acquired from
`CHAR_BITS`, maybe use that instead of hard coding 8?
https://en.cppreference.com/w/c/types/limits
Repository:
rC Clang
https://reviews.llvm.org/D52730
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits