Skip to content

Commit e0919f1

Browse files
committed
C#: Cleaup expanded assignments from the dispatch logic.
1 parent bcf78ac commit e0919f1

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

csharp/ql/lib/semmle/code/csharp/dispatch/Dispatch.qll

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,9 @@ private module Internal {
202202
private predicate isPotentialEventCall(
203203
AssignArithmeticOperation aao, DynamicMemberAccess dma, string name
204204
) {
205-
exists(DynamicOperatorCall doc, AssignExpr ae |
206-
ae = aao.getExpandedAssignment() and
207-
dma = ae.getLValue() and
208-
doc = ae.getRValue()
209-
|
205+
aao instanceof DynamicOperatorCall and
206+
dma = aao.getLeftOperand() and
207+
(
210208
aao instanceof AssignAddExpr and
211209
name = "add_" + dma.getLateBoundTargetName()
212210
or

0 commit comments

Comments
 (0)