[Fixed Point] Move the compassign LHS type correction a bit further down. NFCI.
authorBevin Hansson <bevin.hansson@ericsson.com>
Thu, 16 Apr 2020 13:02:41 +0000 (15:02 +0200)
committerBevin Hansson <bevin.hansson@ericsson.com>
Fri, 17 Apr 2020 08:09:02 +0000 (10:09 +0200)
commitfd7a34186137168064ffe2ca536823559b92d939
treebfec78649d321c147b94a12a8c81b286f986e446
parent485862ecdac4a7c67c515da2e8af209d5c17d911
[Fixed Point] Move the compassign LHS type correction a bit further down. NFCI.

Summary:
We can simplify the LHSTy correction for
fixed-point compassign by moving it below
the point where we know we have a compound
assignment.

Also, we shouldn't look at the LHS and RHS
separately; look at the computation result
type instead.

Looking at the LHS and RHS is also wrong
for compassigns with fixed and floating
point (though this does not work upstream
yet).

Reviewers: leonardchan

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D78294
clang/lib/Sema/SemaExpr.cpp