Skip to content

Commit fe6655b

Browse files
committed
C#: More merge conflict fixes.
1 parent aeaca1d commit fe6655b

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowDispatch.qll

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,16 @@ class DataFlowCallable extends TDataFlowCallable {
191191
or
192192
result = this.asCapturedVariable().getLocation()
193193
}
194+
195+
/** Gets a best-effort total ordering. */
196+
int totalorder() {
197+
this =
198+
rank[result](DataFlowCallable c, string file, int startline, int startcolumn |
199+
c.getLocation().hasLocationInfo(file, startline, startcolumn, _, _)
200+
|
201+
c order by file, startline, startcolumn
202+
)
203+
}
194204
}
195205

196206
/** A call relevant for data flow. */
@@ -237,6 +247,16 @@ abstract class DataFlowCall extends TDataFlowCall {
237247
) {
238248
this.getLocation().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
239249
}
250+
251+
/** Gets a best-effort total ordering. */
252+
int totalorder() {
253+
this =
254+
rank[result](DataFlowCall c, int startline, int startcolumn |
255+
c.hasLocationInfo(_, startline, startcolumn, _, _)
256+
|
257+
c order by startline, startcolumn
258+
)
259+
}
240260
}
241261

242262
/** A non-delegate C# call relevant for data flow. */

csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2379,6 +2379,15 @@ class NodeRegion instanceof ControlFlow::BasicBlock {
23792379
string toString() { result = "NodeRegion" }
23802380

23812381
predicate contains(Node n) { this = n.getControlFlowNode().getBasicBlock() }
2382+
2383+
int totalOrder() {
2384+
this =
2385+
rank[result](ControlFlow::BasicBlock b, int startline, int startcolumn |
2386+
b.getLocation().hasLocationInfo(_, startline, startcolumn, _, _)
2387+
|
2388+
b order by startline, startcolumn
2389+
)
2390+
}
23822391
}
23832392

23842393
/**

0 commit comments

Comments
 (0)