]> granicus.if.org Git - clang/commitdiff
Assignment operators should return by reference.
authorJohn McCall <rjmccall@apple.com>
Mon, 4 Apr 2016 18:53:01 +0000 (18:53 +0000)
committerJohn McCall <rjmccall@apple.com>
Mon, 4 Apr 2016 18:53:01 +0000 (18:53 +0000)
Thanks to Sean Silva for pointing this out.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@265328 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/CharUnits.h

index b2da51c23b85cf77efaa3b011816f152d36afe29..564c8ec9b9ea07470c6db7a0a9917b9f878f8128 100644 (file)
@@ -149,7 +149,7 @@ namespace clang {
       CharUnits operator/ (QuantityType N) const {
         return CharUnits(Quantity / N);
       }
-      CharUnits operator/= (QuantityType N) {
+      CharUnits &operator/= (QuantityType N) {
         Quantity /= N;
         return *this;
       }