mirror of
https://github.com/github/codeql.git
synced 2026-05-27 01:21:23 +02:00
C#: Prevent bad magic in a few predicates.
This commit is contained in:
@@ -305,6 +305,7 @@ class ComparisonTest extends TComparisonTest {
|
||||
}
|
||||
|
||||
/** Gets an argument of this comparison test. */
|
||||
pragma[nomagic]
|
||||
Expr getAnArgument() {
|
||||
result = this.getFirstArgument() or
|
||||
result = this.getSecondArgument()
|
||||
|
||||
@@ -40,6 +40,7 @@ class Call extends Expr, @call {
|
||||
Callable getTarget() { none() }
|
||||
|
||||
/** Gets the `i`th argument to this call, if any. */
|
||||
pragma[nomagic]
|
||||
Expr getArgument(int i) { result = this.getChild(i) and i >= 0 }
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user