GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Java/C#: Address review comments. · github/codeql@e1048cf

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • csharp/ql/src/utils/modelgenerator/internal
    • CaptureModels.qll
  • java/ql/src/utils/modelgenerator/internal
    • CaptureModels.qll
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎csharp/ql/src/utils/modelgenerator/internal/CaptureModels.qll‎

Copy file name to clipboardExpand all lines: csharp/ql/src/utils/modelgenerator/internal/CaptureModels.qll
+12-12Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -279,24 +279,24 @@ private module PropagateContentFlowConfig implements ContentDataFlow::ConfigSig
279279

280280
private module PropagateContentFlow = ContentDataFlow::Global<PropagateContentFlowConfig>;
281281

282-
private string printStoreAccessPath(PropagateContentFlow::AccessPath ap) {
283-
not exists(ap.getHead()) and result = ""
284-
or
282+
private string getContent(PropagateContentFlow::AccessPath ap, int i) {
285283
exists(ContentSet head, PropagateContentFlow::AccessPath tail |
286284
head = ap.getHead() and
287-
tail = ap.getTail() and
288-
result = "." + printContent(head) + printStoreAccessPath(tail)
285+
tail = ap.getTail()
286+
|
287+
i = 0 and
288+
result = "." + printContent(head)
289+
or
290+
i > 0 and result = getContent(tail, i - 1)
289291
)
290292
}
291293

294+
private string printStoreAccessPath(PropagateContentFlow::AccessPath ap) {
295+
result = concat(int i | | getContent(ap, i), "" order by i)
296+
}
297+
292298
private string printReadAccessPath(PropagateContentFlow::AccessPath ap) {
293-
not exists(ap.getHead()) and result = ""
294-
or
295-
exists(ContentSet head, PropagateContentFlow::AccessPath tail |
296-
head = ap.getHead() and
297-
tail = ap.getTail() and
298-
result = printReadAccessPath(tail) + "." + printContent(head)
299-
)
299+
result = concat(int i | | getContent(ap, i), "" order by i desc)
300300
}
301301

302302
string captureContentFlow(DataFlowSummaryTargetApi api) {
Collapse file

‎java/ql/src/utils/modelgenerator/internal/CaptureModels.qll‎

Copy file name to clipboardExpand all lines: java/ql/src/utils/modelgenerator/internal/CaptureModels.qll
+12-12Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -279,24 +279,24 @@ private module PropagateContentFlowConfig implements ContentDataFlow::ConfigSig
279279

280280
private module PropagateContentFlow = ContentDataFlow::Global<PropagateContentFlowConfig>;
281281

282-
private string printStoreAccessPath(PropagateContentFlow::AccessPath ap) {
283-
not exists(ap.getHead()) and result = ""
284-
or
282+
private string getContent(PropagateContentFlow::AccessPath ap, int i) {
285283
exists(ContentSet head, PropagateContentFlow::AccessPath tail |
286284
head = ap.getHead() and
287-
tail = ap.getTail() and
288-
result = "." + printContent(head) + printStoreAccessPath(tail)
285+
tail = ap.getTail()
286+
|
287+
i = 0 and
288+
result = "." + printContent(head)
289+
or
290+
i > 0 and result = getContent(tail, i - 1)
289291
)
290292
}
291293

294+
private string printStoreAccessPath(PropagateContentFlow::AccessPath ap) {
295+
result = concat(int i | | getContent(ap, i), "" order by i)
296+
}
297+
292298
private string printReadAccessPath(PropagateContentFlow::AccessPath ap) {
293-
not exists(ap.getHead()) and result = ""
294-
or
295-
exists(ContentSet head, PropagateContentFlow::AccessPath tail |
296-
head = ap.getHead() and
297-
tail = ap.getTail() and
298-
result = printReadAccessPath(tail) + "." + printContent(head)
299-
)
299+
result = concat(int i | | getContent(ap, i), "" order by i desc)
300300
}
301301

302302
string captureContentFlow(DataFlowSummaryTargetApi api) {

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.