aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-05-02 18:30:45 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-05-02 18:30:45 +0000
commit570918821a8492048e6ab54955c9864bd6c3e952 (patch)
treef9d0d3f3478c298aaf51987483bbbbefe8e6631b /lib/CodeGen/CGExpr.cpp
parentf0c55418e2b09eaab37c820d3756cc1b4584d084 (diff)
downloadsrc-570918821a8492048e6ab54955c9864bd6c3e952.tar.gz
src-570918821a8492048e6ab54955c9864bd6c3e952.zip
Notes
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
-rw-r--r--lib/CodeGen/CGExpr.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp
index d0aacf65428f..863b4380da47 100644
--- a/lib/CodeGen/CGExpr.cpp
+++ b/lib/CodeGen/CGExpr.cpp
@@ -4065,6 +4065,8 @@ LValue CodeGenFunction::EmitBinaryOperatorLValue(const BinaryOperator *E) {
RValue RV = EmitAnyExpr(E->getRHS());
LValue LV = EmitCheckedLValue(E->getLHS(), TCK_Store);
+ if (RV.isScalar())
+ EmitNullabilityCheck(LV, RV.getScalarVal(), E->getExprLoc());
EmitStoreThroughLValue(RV, LV);
return LV;
}