[cfe-commits] r123804 - /cfe/trunk/include/clang/AST/CharUnits.h
Ken Dyck
kd at kendyck.com
Tue Jan 18 17:44:40 PST 2011
Author: kjdyck
Date: Tue Jan 18 19:44:40 2011
New Revision: 123804
URL: http://llvm.org/viewvc/llvm-project?rev=123804&view=rev
Log:
Add a unary minus operator.
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=123804&r1=123803&r2=123804&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/CharUnits.h (original)
+++ cfe/trunk/include/clang/AST/CharUnits.h Tue Jan 18 19:44:40 2011
@@ -132,6 +132,10 @@
CharUnits operator- (const CharUnits &Other) const {
return CharUnits(Quantity - Other.Quantity);
}
+ CharUnits operator- () const {
+ return CharUnits(-Quantity);
+ }
+
// Conversions.
More information about the cfe-commits
mailing list