Skip to content

Commit 6821639

Browse files
committed
Data flow: Sync files
1 parent 4bf0782 commit 6821639

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ module Public {
9090
predicate contains(SummaryComponent c) { c = this.drop(_).head() }
9191

9292
/** Gets the bottom element of this stack. */
93-
SummaryComponent bottom() { result = this.drop(this.length() - 1).head() }
93+
SummaryComponent bottom() {
94+
this = TSingletonSummaryComponentStack(result) or result = this.tail().bottom()
95+
}
9496

9597
/** Gets a textual representation of this stack. */
9698
string toString() {

ruby/ql/lib/codeql/ruby/dataflow/internal/FlowSummaryImpl.qll

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ module Public {
9090
predicate contains(SummaryComponent c) { c = this.drop(_).head() }
9191

9292
/** Gets the bottom element of this stack. */
93-
SummaryComponent bottom() { result = this.drop(this.length() - 1).head() }
93+
SummaryComponent bottom() {
94+
this = TSingletonSummaryComponentStack(result) or result = this.tail().bottom()
95+
}
9496

9597
/** Gets a textual representation of this stack. */
9698
string toString() {

0 commit comments

Comments
 (0)