From: Ken Dyck Date: Wed, 19 Jan 2011 01:44:40 +0000 (+0000) Subject: Add a unary minus operator. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=69fc1b330090853ced40436805258fc9a0a70bdc;p=clang Add a unary minus operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123804 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/CharUnits.h b/include/clang/AST/CharUnits.h index 9a7b3720e8..1044fb742a 100644 --- a/include/clang/AST/CharUnits.h +++ b/include/clang/AST/CharUnits.h @@ -132,6 +132,10 @@ namespace clang { CharUnits operator- (const CharUnits &Other) const { return CharUnits(Quantity - Other.Quantity); } + CharUnits operator- () const { + return CharUnits(-Quantity); + } + // Conversions.