mirror of
https://github.com/github/codeql.git
synced 2026-05-01 11:45:14 +02:00
C#: Add extractor and QL library support for ref readonly parameters.
This commit is contained in:
@@ -167,6 +167,18 @@ class Parameter extends DotNet::Parameter, LocalScopeVariable, Attributable, Top
|
||||
*/
|
||||
predicate isParams() { params(this, _, _, _, 3, _, _) }
|
||||
|
||||
/**
|
||||
* Holds if this parameter if a ref readonly parameter.
|
||||
* For example, `p` is a ref readonly parameter in
|
||||
*
|
||||
* ```csharp
|
||||
* void M(ref readonly int p) {
|
||||
* ...
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
predicate isReadonlyRef() { params(this, _, _, _, 6, _, _) }
|
||||
|
||||
/**
|
||||
* Holds this parameter is the first parameter of an extension method.
|
||||
* For example, `list` is the first parameter of the extension method
|
||||
|
||||
Reference in New Issue
Block a user