[PATCH] D43704: Utility functions for checked arithmetic

George Karpenkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 26 13:36:06 PST 2018


george.karpenkov added inline comments.


================
Comment at: include/llvm/Support/CheckedArithmetic.h:33
+    T LHS, T RHS,
+    std::function<llvm::APInt(llvm::APInt *, const llvm::APInt &, bool &)> Op,
+    T *Res = nullptr) {
----------------
vsk wrote:
> I'd rather just have the type of the function be some free template parameter, then, so it's clear the object isn't copied.
Could you elaborate?


https://reviews.llvm.org/D43704





More information about the llvm-commits mailing list