hubert.reinterpretcast added inline comments.

================
Comment at: include/llvm/Support/MathExtras.h:672
@@ -669,2 +671,3 @@
 inline uint64_t alignTo(uint64_t Value, uint64_t Align, uint64_t Skew = 0) {
+  assert(Align != 0u);
   Skew %= Align;
----------------
aaron.ballman wrote:
> Usually preferred to put in && "rationale goes here" for asserts (here and 
> elsewhere).
> 
> Were these changes expected, as they don't seem to relate to constexpr?
Sure, I can add the "friendly text".

Also, these changes are expected. The behaviour of these functions when Align 
is 0 is the reason why I did not modify them so that they may be marked 
constexpr (according to the language).


https://reviews.llvm.org/D22824



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

Reply via email to