Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f9bfd96

Browse filesBrowse files
committed
C++: Address review comments
1 parent 35403d4 commit f9bfd96
Copy full SHA for f9bfd96

File tree

Expand file treeCollapse file tree

3 files changed

+9
-12
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+9
-12
lines changed

‎cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/PrintIR.qll

Copy file name to clipboardExpand all lines: cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/PrintIR.qll
+3-4Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -422,21 +422,20 @@ private int getSuccessorIndex(IRBlock pred, IRBlock succ) {
422422
* has the given `value`.
423423
*/
424424
query predicate edges(PrintableIRBlock pred, PrintableIRBlock succ, string key, string value) {
425-
exists(EdgeKind kind, IRBlock predBlock, IRBlock succBlock |
425+
exists(IRBlock predBlock, IRBlock succBlock |
426426
predBlock = pred.getBlock() and
427427
succBlock = succ.getBlock() and
428-
predBlock.getSuccessor(kind) = succBlock and
429428
(
430429
key = "semmle.label" and
431430
exists(string kinds |
432431
kinds =
433-
concat(EdgeKind k |
432+
strictconcat(EdgeKind k |
434433
predBlock.getSuccessor(k) = succBlock
435434
|
436435
k.toString(), "|" order by k.toString()
437436
)
438437
|
439-
if predBlock.getBackEdgeSuccessor(kind) = succBlock
438+
if predBlock.getBackEdgeSuccessor(_) = succBlock
440439
then value = kinds + " (back edge)"
441440
else value = kinds
442441
)

‎cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/PrintIR.qll

Copy file name to clipboardExpand all lines: cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/PrintIR.qll
+3-4Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -422,21 +422,20 @@ private int getSuccessorIndex(IRBlock pred, IRBlock succ) {
422422
* has the given `value`.
423423
*/
424424
query predicate edges(PrintableIRBlock pred, PrintableIRBlock succ, string key, string value) {
425-
exists(EdgeKind kind, IRBlock predBlock, IRBlock succBlock |
425+
exists(IRBlock predBlock, IRBlock succBlock |
426426
predBlock = pred.getBlock() and
427427
succBlock = succ.getBlock() and
428-
predBlock.getSuccessor(kind) = succBlock and
429428
(
430429
key = "semmle.label" and
431430
exists(string kinds |
432431
kinds =
433-
concat(EdgeKind k |
432+
strictconcat(EdgeKind k |
434433
predBlock.getSuccessor(k) = succBlock
435434
|
436435
k.toString(), "|" order by k.toString()
437436
)
438437
|
439-
if predBlock.getBackEdgeSuccessor(kind) = succBlock
438+
if predBlock.getBackEdgeSuccessor(_) = succBlock
440439
then value = kinds + " (back edge)"
441440
else value = kinds
442441
)

‎cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/PrintIR.qll

Copy file name to clipboardExpand all lines: cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/PrintIR.qll
+3-4Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -422,21 +422,20 @@ private int getSuccessorIndex(IRBlock pred, IRBlock succ) {
422422
* has the given `value`.
423423
*/
424424
query predicate edges(PrintableIRBlock pred, PrintableIRBlock succ, string key, string value) {
425-
exists(EdgeKind kind, IRBlock predBlock, IRBlock succBlock |
425+
exists(IRBlock predBlock, IRBlock succBlock |
426426
predBlock = pred.getBlock() and
427427
succBlock = succ.getBlock() and
428-
predBlock.getSuccessor(kind) = succBlock and
429428
(
430429
key = "semmle.label" and
431430
exists(string kinds |
432431
kinds =
433-
concat(EdgeKind k |
432+
strictconcat(EdgeKind k |
434433
predBlock.getSuccessor(k) = succBlock
435434
|
436435
k.toString(), "|" order by k.toString()
437436
)
438437
|
439-
if predBlock.getBackEdgeSuccessor(kind) = succBlock
438+
if predBlock.getBackEdgeSuccessor(_) = succBlock
440439
then value = kinds + " (back edge)"
441440
else value = kinds
442441
)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.