diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/AST/Expr.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp index 8beecc0856..7983d61f04 100644 --- a/lib/AST/Expr.cpp +++ b/lib/AST/Expr.cpp @@ -1631,8 +1631,11 @@ bool Expr::isUnusedResultAWarning(SourceLocation &Loc, SourceRange &R1, // DiagnoseUnusedComparison should be as well. const CXXOperatorCallExpr *Op = cast<CXXOperatorCallExpr>(this); if (Op->getOperator() == OO_EqualEqual || - Op->getOperator() == OO_ExclaimEqual) + Op->getOperator() == OO_ExclaimEqual) { + Loc = Op->getOperatorLoc(); + R1 = Op->getSourceRange(); return true; + } // Fallthrough for generic call handling. } |