@@ -6,6 +6,7 @@ private import ControlFlowReachability
66private import FlowSummaryImpl as FlowSummaryImpl
77private import semmle.code.csharp.dataflow.FlowSummary as FlowSummary
88private import semmle.code.csharp.dataflow.internal.ExternalFlow
9+ private import semmle.code.csharp.commons.Collections
910private import semmle.code.csharp.Conversion
1011private import semmle.code.csharp.dataflow.internal.SsaImpl as SsaImpl
1112private import semmle.code.csharp.ExprOrStmtParent
@@ -16,7 +17,6 @@ private import semmle.code.csharp.frameworks.EntityFramework
1617private import semmle.code.csharp.frameworks.system.linq.Expressions
1718private import semmle.code.csharp.frameworks.NHibernate
1819private import semmle.code.csharp.frameworks.Razor
19- private import semmle.code.csharp.frameworks.system.Collections
2020private import semmle.code.csharp.frameworks.system.threading.Tasks
2121private import semmle.code.csharp.internal.Location
2222private import codeql.util.Unit
@@ -1087,7 +1087,7 @@ predicate exprMayHavePostUpdateNode(Expr e) {
10871087 or
10881088 t = any ( TypeParameter tp | not tp .isValueType ( ) )
10891089 or
1090- t . isRefLikeType ( )
1090+ t instanceof Struct
10911091 )
10921092}
10931093
@@ -2545,6 +2545,7 @@ private predicate clearsCont(Node n, Content c) {
25452545 a .getType ( ) = s and
25462546 f = s .getAField ( ) and
25472547 c .( FieldContent ) .getField ( ) = f .getUnboundDeclaration ( ) and
2548+ not f .getType ( ) instanceof CollectionType and
25482549 not f .isRef ( )
25492550 )
25502551 or
0 commit comments