diff options
author | Ken Dyck <kd@kendyck.com> | 2011-01-19 01:44:40 +0000 |
---|---|---|
committer | Ken Dyck <kd@kendyck.com> | 2011-01-19 01:44:40 +0000 |
commit | 69fc1b330090853ced40436805258fc9a0a70bdc (patch) | |
tree | 6935e6d567fd0da4220511d831af5403e7982b10 /include/clang/AST/CharUnits.h | |
parent | bcbd03ac0ac0890a436e1a179d3a285e914d41fa (diff) |
Add a unary minus operator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123804 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST/CharUnits.h')
-rw-r--r-- | include/clang/AST/CharUnits.h | 4 |
1 files changed, 4 insertions, 0 deletions
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. |