Skip to content

Commit 2be090b

Browse files
committed
C#: Add predicate isRef to the CIL Field class.
1 parent db047c2 commit 2be090b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

csharp/ql/lib/semmle/code/cil/Variable.qll

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,4 +152,7 @@ class Field extends DotNet::Field, Variable, Member, CustomModifierReceiver, @ci
152152
override ValueOrRefType getDeclaringType() { cil_field(this, result, _, _) }
153153

154154
override Location getLocation() { result = this.getDeclaringType().getLocation() }
155+
156+
/** Holds if this declaration is `ref`. */
157+
predicate isRef() { cil_type_annotation(this, 32) }
155158
}

0 commit comments

Comments
 (0)