[NFC] Avoid unnecessary duplication of code generating diagnostic.
authorDan Liew <dliew@apple.com>
Tue, 19 Apr 2022 23:28:33 +0000 (16:28 -0700)
committerDan Liew <dliew@apple.com>
Wed, 20 Apr 2022 17:50:21 +0000 (10:50 -0700)
commit3d612a930dce229c887cd9a731084df419f43791
treea4ff12b445ae0d43e980074c77c0252695b9e3f4
parent5e54a413de1f803718816dba35a59fbc4c7ed082
[NFC] Avoid unnecessary duplication of code generating diagnostic.

The previous code unneccessarily duplicated the creation of a diagnostic
where the only difference was the `AssignmentAction` being passed.

rdar://88664722

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