C#: Prevent bad magic in a few predicates.

This commit is contained in:
Mathias Vorreiter Pedersen
2024-08-09 15:19:54 +01:00
parent 7bc16a378d
commit be175aa1a0
2 changed files with 2 additions and 0 deletions

View File

@@ -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()

View File

@@ -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 }
/**