File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed
csharp/ql/lib/semmle/code/csharp/dataflow/internal
java/ql/lib/semmle/code/java/dataflow/internal
ruby/ql/lib/codeql/ruby/dataflow/internal Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff 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() {
Original file line number Diff line number Diff 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() {
Original file line number Diff line number Diff 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() {
You can’t perform that action at this time.
0 commit comments