diff options
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index d78c4962a4..efc05de90e 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -7626,9 +7626,10 @@ ExprResult Sema::CreateBuiltinBinOp(SourceLocation OpLoc, !LeftType->canDecayToPointerType() && !RightType->isAnyPointerType() && !RightType->canDecayToPointerType()) { - Diag(OpLoc, diag::warn_null_in_arithmetic_operation) - << (LeftNull ? lhs.get()->getSourceRange() - : rhs.get()->getSourceRange()); + Diag(OpLoc, diag::warn_null_in_comparison_operation) + << LeftNull /* LHS is NULL */ + << (LeftNull ? rhs.get()->getType() : lhs.get()->getType()) + << lhs.get()->getSourceRange() << rhs.get()->getSourceRange(); } } } |