From 69fc1b330090853ced40436805258fc9a0a70bdc Mon Sep 17 00:00:00 2001 From: Ken Dyck Date: Wed, 19 Jan 2011 01:44:40 +0000 Subject: [PATCH] Add a unary minus operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123804 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/AST/CharUnits.h | 4 ++++ 1 file changed, 4 insertions(+) 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. -- 2.50.1