Skip to content

Commit 83a2569

Browse files
committed
Allow adding inputs and outputs needing reference
1 parent c44cf29 commit 83a2569

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

java/ql/lib/semmle/code/java/dataflow/internal/FlowSummaryImpl.qll

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -921,13 +921,15 @@ module Private {
921921

922922
private predicate inputNeedsReference(string c) {
923923
c = "Argument" or
924-
parseArg(c, _)
924+
parseArg(c, _) or
925+
inputNeedsReferenceSpecific(c)
925926
}
926927

927928
private predicate outputNeedsReference(string c) {
928929
c = "Argument" or
929930
parseArg(c, _) or
930-
c = "ReturnValue"
931+
c = "ReturnValue" or
932+
outputNeedsReferenceSpecific(c)
931933
}
932934

933935
private predicate sourceElementRef(InterpretNode ref, string output, string kind) {

java/ql/lib/semmle/code/java/dataflow/internal/FlowSummaryImplSpecific.qll

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,12 @@ string getParameterPositionCsv(ParameterPosition pos) { result = pos.toString()
102102
/** Gets the textual representation of an argument position in the format used for flow summaries. */
103103
string getArgumentPositionCsv(ArgumentPosition pos) { result = pos.toString() }
104104

105+
/** Holds if input specification component `c` needs a reference. */
106+
predicate inputNeedsReferenceSpecific(string c) { none() }
107+
108+
/** Holds if output specification component `c` needs a reference. */
109+
predicate outputNeedsReferenceSpecific(string c) { none() }
110+
105111
class SourceOrSinkElement = Top;
106112

107113
/**

0 commit comments

Comments
 (0)