mirror of
https://github.com/github/codeql.git
synced 2026-04-26 17:25:19 +02:00
C++: Fix IR printing when multiple edges point to the same block
This commit is contained in:
@@ -427,11 +427,18 @@ query predicate edges(PrintableIRBlock pred, PrintableIRBlock succ, string key,
|
||||
succBlock = succ.getBlock() and
|
||||
predBlock.getSuccessor(kind) = succBlock and
|
||||
(
|
||||
(
|
||||
key = "semmle.label" and
|
||||
key = "semmle.label" and
|
||||
exists(string kinds |
|
||||
kinds =
|
||||
concat(EdgeKind k |
|
||||
predBlock.getSuccessor(k) = succBlock
|
||||
|
|
||||
k.toString(), "|" order by k.toString()
|
||||
)
|
||||
|
|
||||
if predBlock.getBackEdgeSuccessor(kind) = succBlock
|
||||
then value = kind.toString() + " (back edge)"
|
||||
else value = kind.toString()
|
||||
then value = kinds + " (back edge)"
|
||||
else value = kinds
|
||||
)
|
||||
or
|
||||
key = "semmle.order" and
|
||||
|
||||
@@ -427,11 +427,18 @@ query predicate edges(PrintableIRBlock pred, PrintableIRBlock succ, string key,
|
||||
succBlock = succ.getBlock() and
|
||||
predBlock.getSuccessor(kind) = succBlock and
|
||||
(
|
||||
(
|
||||
key = "semmle.label" and
|
||||
key = "semmle.label" and
|
||||
exists(string kinds |
|
||||
kinds =
|
||||
concat(EdgeKind k |
|
||||
predBlock.getSuccessor(k) = succBlock
|
||||
|
|
||||
k.toString(), "|" order by k.toString()
|
||||
)
|
||||
|
|
||||
if predBlock.getBackEdgeSuccessor(kind) = succBlock
|
||||
then value = kind.toString() + " (back edge)"
|
||||
else value = kind.toString()
|
||||
then value = kinds + " (back edge)"
|
||||
else value = kinds
|
||||
)
|
||||
or
|
||||
key = "semmle.order" and
|
||||
|
||||
@@ -427,11 +427,18 @@ query predicate edges(PrintableIRBlock pred, PrintableIRBlock succ, string key,
|
||||
succBlock = succ.getBlock() and
|
||||
predBlock.getSuccessor(kind) = succBlock and
|
||||
(
|
||||
(
|
||||
key = "semmle.label" and
|
||||
key = "semmle.label" and
|
||||
exists(string kinds |
|
||||
kinds =
|
||||
concat(EdgeKind k |
|
||||
predBlock.getSuccessor(k) = succBlock
|
||||
|
|
||||
k.toString(), "|" order by k.toString()
|
||||
)
|
||||
|
|
||||
if predBlock.getBackEdgeSuccessor(kind) = succBlock
|
||||
then value = kind.toString() + " (back edge)"
|
||||
else value = kind.toString()
|
||||
then value = kinds + " (back edge)"
|
||||
else value = kinds
|
||||
)
|
||||
or
|
||||
key = "semmle.order" and
|
||||
|
||||
Reference in New Issue
Block a user