aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/clang/AST/CharUnits.h4
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.