diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/PrintIR.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/PrintIR.qll index 7fd66ba84414e..5969085147712 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/PrintIR.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/PrintIR.qll @@ -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 diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/PrintIR.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/PrintIR.qll index 7fd66ba84414e..5969085147712 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/PrintIR.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/PrintIR.qll @@ -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 diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/PrintIR.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/PrintIR.qll index 7fd66ba84414e..5969085147712 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/PrintIR.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/PrintIR.qll @@ -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 diff --git a/cpp/ql/test/library-tests/ir/ir/aliased_ir.expected b/cpp/ql/test/library-tests/ir/ir/aliased_ir.expected index da2136cba1d4f..59a1fbbc33aa1 100644 --- a/cpp/ql/test/library-tests/ir/ir/aliased_ir.expected +++ b/cpp/ql/test/library-tests/ir/ir/aliased_ir.expected @@ -38831,7 +38831,7 @@ try_except.c: # 23| v23_3(void) = Call[ProbeFunction] : func:r23_1, 0:r23_2 # 23| m23_4(unknown) = ^CallSideEffect : ~m21_5 # 23| m23_5(unknown) = Chi : total:m21_5, partial:m23_4 -#-----| SEH Exception -> Block 4 +#-----| Goto|SEH Exception -> Block 4 # 26| Block 4 # 26| m26_1(unknown) = Phi : from 0:~m21_5, from 3:~m23_5 @@ -39028,7 +39028,7 @@ try_except.cpp: # 23| v23_3(void) = Call[ProbeFunction] : func:r23_1, 0:r23_2 # 23| m23_4(unknown) = ^CallSideEffect : ~m21_5 # 23| m23_5(unknown) = Chi : total:m21_5, partial:m23_4 -#-----| SEH Exception -> Block 4 +#-----| Goto|SEH Exception -> Block 4 # 26| Block 4 # 26| m26_1(unknown) = Phi : from 0:~m21_5, from 3:~m23_5 diff --git a/cpp/ql/test/library-tests/ir/ir/raw_ir.expected b/cpp/ql/test/library-tests/ir/ir/raw_ir.expected index dfaea0dc04e49..3f9b2986fe596 100644 --- a/cpp/ql/test/library-tests/ir/ir/raw_ir.expected +++ b/cpp/ql/test/library-tests/ir/ir/raw_ir.expected @@ -37077,7 +37077,7 @@ try_except.c: # 23| r23_2(int) = Constant[0] : # 23| v23_3(void) = Call[ProbeFunction] : func:r23_1, 0:r23_2 # 23| mu23_4(unknown) = ^CallSideEffect : ~m? -#-----| SEH Exception -> Block 4 +#-----| Goto|SEH Exception -> Block 4 # 26| Block 4 # 26| r26_1(glval) = FunctionAddress[sink] : @@ -37266,7 +37266,7 @@ try_except.cpp: # 23| r23_2(int) = Constant[0] : # 23| v23_3(void) = Call[ProbeFunction] : func:r23_1, 0:r23_2 # 23| mu23_4(unknown) = ^CallSideEffect : ~m? -#-----| SEH Exception -> Block 4 +#-----| Goto|SEH Exception -> Block 4 # 26| Block 4 # 26| r26_1(glval) = FunctionAddress[sink] :