baloghadamsoftware marked 12 inline comments as done.
baloghadamsoftware added inline comments.


================
Comment at: lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:326
+
+  llvm::APSInt Max = AT.getMaxValue() >> 2; // Divide by 4.
+  SVal IsCappedFromAbove =
----------------
george.karpenkov wrote:
> Would just division produce the same result? Also probably it's better to 
> make "4" a constant, at least with `#define`
I changed it to division, but I am not sure if we a constant would be more 
readable here than 4.


================
Comment at: lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:337
+
+  llvm::APSInt Min = -Max;
+  SVal IsCappedFromBelow =
----------------
george.karpenkov wrote:
> 326-335 duplicates 338-346.
> Perhaps we could have
> 
> ```
> static bool isCappedFrom(bool Above, llvm::APSInt bound, ...)
> ```
> 
> ?
isInRelation(), because the opcode itself is passed instead of a bool.


https://reviews.llvm.org/D41938



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

Reply via email to