Merge pull request #80 from microsoft/more-2.18.1-upgrade-fixes

C#: More merge conflict fixes
This commit is contained in:
dilanbhalla
2024-08-12 12:02:12 -07:00
committed by GitHub
2 changed files with 29 additions and 0 deletions

View File

@@ -191,6 +191,16 @@ class DataFlowCallable extends TDataFlowCallable {
or
result = this.asCapturedVariable().getLocation()
}
/** Gets a best-effort total ordering. */
int totalorder() {
this =
rank[result](DataFlowCallable c, string file, int startline, int startcolumn |
c.getLocation().hasLocationInfo(file, startline, startcolumn, _, _)
|
c order by file, startline, startcolumn
)
}
}
/** A call relevant for data flow. */
@@ -237,6 +247,16 @@ abstract class DataFlowCall extends TDataFlowCall {
) {
this.getLocation().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
}
/** Gets a best-effort total ordering. */
int totalorder() {
this =
rank[result](DataFlowCall c, int startline, int startcolumn |
c.hasLocationInfo(_, startline, startcolumn, _, _)
|
c order by startline, startcolumn
)
}
}
/** A non-delegate C# call relevant for data flow. */

View File

@@ -2379,6 +2379,15 @@ class NodeRegion instanceof ControlFlow::BasicBlock {
string toString() { result = "NodeRegion" }
predicate contains(Node n) { this = n.getControlFlowNode().getBasicBlock() }
int totalOrder() {
this =
rank[result](ControlFlow::BasicBlock b, int startline, int startcolumn |
b.getLocation().hasLocationInfo(_, startline, startcolumn, _, _)
|
b order by startline, startcolumn
)
}
}
/**