r265328 - Assignment operators should return by reference.
John McCall via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 4 11:53:01 PDT 2016
Author: rjmccall
Date: Mon Apr 4 13:53:01 2016
New Revision: 265328
URL: http://llvm.org/viewvc/llvm-project?rev=265328&view=rev
Log:
Assignment operators should return by reference.
Thanks to Sean Silva for pointing this out.
Modified:
cfe/trunk/include/clang/AST/CharUnits.h
Modified: cfe/trunk/include/clang/AST/CharUnits.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/CharUnits.h?rev=265328&r1=265327&r2=265328&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/CharUnits.h (original)
+++ cfe/trunk/include/clang/AST/CharUnits.h Mon Apr 4 13:53:01 2016
@@ -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;
}
More information about the cfe-commits
mailing list