Skip to content

Commit c00b089

Browse files
committed
C#: Introduce library support for scoped.
1 parent 955f23d commit c00b089

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ class LocalScopeVariable extends Variable, @local_scope_variable {
7171
*/
7272
predicate isRef() { none() }
7373

74+
/**
75+
* Holds if this local variable or parameter is `scoped`.
76+
*/
77+
predicate isScoped() { scoped_annotation(this, _) }
78+
7479
override predicate hasQualifiedName(string qualifier, string name) { none() }
7580
}
7681

0 commit comments

Comments
 (0)