From: John McCall Date: Mon, 4 Apr 2016 18:53:01 +0000 (+0000) Subject: Assignment operators should return by reference. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aaff8e3f7902f20985e4892a2f657cea0513c22a;p=clang Assignment operators should return by reference. 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 --- diff --git a/include/clang/AST/CharUnits.h b/include/clang/AST/CharUnits.h index b2da51c23b..564c8ec9b9 100644 --- a/include/clang/AST/CharUnits.h +++ b/include/clang/AST/CharUnits.h @@ -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; }