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.
 


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to