<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class="">On Apr 4, 2016, at 11:49 AM, Sean Silva <<a href="mailto:chisophugis@gmail.com" class="">chisophugis@gmail.com</a>> wrote:</div><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote">On Mon, Apr 4, 2016 at 11:33 AM, John McCall via cfe-commits <span dir="ltr" class=""><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank" class="">cfe-commits@lists.llvm.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: rjmccall<br class="">
Date: Mon Apr  4 13:33:00 2016<br class="">
New Revision: 265323<br class="">
<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=265323&view=rev" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project?rev=265323&view=rev</a><br class="">
Log:<br class="">
Add a couple of convenience operations to CharUnits.<br class="">
<br class="">
Modified:<br class="">
    cfe/trunk/include/clang/AST/CharUnits.h<br class="">
<br class="">
Modified: cfe/trunk/include/clang/AST/CharUnits.h<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/CharUnits.h?rev=265323&r1=265322&r2=265323&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/CharUnits.h?rev=265323&r1=265322&r2=265323&view=diff</a><br class="">
==============================================================================<br class="">
--- cfe/trunk/include/clang/AST/CharUnits.h (original)<br class="">
+++ cfe/trunk/include/clang/AST/CharUnits.h Mon Apr  4 13:33:00 2016<br class="">
@@ -142,9 +142,17 @@ namespace clang {<br class="">
       CharUnits operator* (QuantityType N) const {<br class="">
         return CharUnits(Quantity * N);<br class="">
       }<br class="">
+      CharUnits &operator*= (QuantityType N) {<br class="">
+        Quantity *= N;<br class="">
+        return *this;<br class="">
+      }<br class="">
       CharUnits operator/ (QuantityType N) const {<br class="">
         return CharUnits(Quantity / N);<br class="">
       }<br class="">
+      CharUnits operator/= (QuantityType N) {<br class=""></blockquote><div class=""><br class=""></div><div class="">Should this return type be a reference like the one for operator*=?</div></div></div></div></div></blockquote><div><br class=""></div></div>Yes, absolutely.  Fixed in r265328, thanks.<div class=""><br class=""></div><div class="">John.</div></body></html>