summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/Expr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/Expr.cpp')
-rw-r--r--clang/lib/AST/Expr.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp
index f51e188b416..aea2f432ad5 100644
--- a/clang/lib/AST/Expr.cpp
+++ b/clang/lib/AST/Expr.cpp
@@ -2094,7 +2094,8 @@ bool Expr::isUnusedResultAWarning(const Expr *&WarnE, SourceLocation &Loc,
case OO_Greater:
case OO_GreaterEqual:
case OO_LessEqual:
- if (Op->getCallReturnType()->isReferenceType())
+ if (Op->getCallReturnType()->isReferenceType() ||
+ Op->getCallReturnType()->isVoidType())
break;
WarnE = this;
Loc = Op->getOperatorLoc();
OpenPOWER on IntegriCloud