Skip to content

Commit 3efc78e

Browse files
committed
Add default for hasOptionalResult
1 parent adbf66a commit 3efc78e

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

cpp/ql/test/library-tests/dataflow/dataflow-tests/has-parameter-flow-out.ql

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ module AstTest {
1919
value = p.getName()
2020
)
2121
}
22-
23-
predicate hasOptionalResult(Location location, string element, string tag, string value) {
24-
none()
25-
}
2622
}
2723
}
2824

@@ -49,10 +45,6 @@ module IRTest {
4945
value = stars(n.getIndirectionIndex()) + p.getName()
5046
)
5147
}
52-
53-
predicate hasOptionalResult(Location location, string element, string tag, string value) {
54-
none()
55-
}
5648
}
5749
}
5850

cpp/ql/test/library-tests/dataflow/source-sink-tests/local-flow.ql

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ module LocalFlowSourceTest implements TestSig {
2727
element = node.toString()
2828
)
2929
}
30-
31-
predicate hasOptionalResult(Location location, string element, string tag, string value) {
32-
none()
33-
}
3430
}
3531

3632
import MakeTest<LocalFlowSourceTest>

shared/util/codeql/util/test/InlineExpectationsTest.qll

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,11 @@ module Make<InlineExpectationsTestSig Impl> {
156156
* A failure will still arise if there is an annotation that does not match any results, but not vice versa.
157157
* Override this predicate to specify optional results.
158158
*/
159-
predicate hasOptionalResult(Impl::Location location, string element, string tag, string value);
159+
default predicate hasOptionalResult(
160+
Impl::Location location, string element, string tag, string value
161+
) {
162+
none()
163+
}
160164
}
161165

162166
/**

0 commit comments

Comments
 (0)