Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1a62296

Browse files
committed
CPP: Tidy up query formatting a little.
1 parent 6427e96 commit 1a62296

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

cpp/ql/src/jsf/4.13 Functions/AV Rule 114.ql

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,17 @@ import cpp
1818
programmer, we can flag it anyway, since this is arguably a bug.) */
1919

2020
predicate functionsMissingReturnStmt(Function f, ControlFlowNode blame) {
21-
f.fromSource() and
22-
exists(Type returnType |
23-
returnType = f.getType().getUnderlyingType().getUnspecifiedType() and
24-
not returnType instanceof VoidType and
25-
not returnType instanceof TemplateParameter
26-
) and
27-
exists(ReturnStmt s | f.getAPredecessor() = s | blame = s.getAPredecessor())}
21+
f.fromSource() and
22+
exists(Type returnType |
23+
returnType = f.getType().getUnderlyingType().getUnspecifiedType() and
24+
not returnType instanceof VoidType and
25+
not returnType instanceof TemplateParameter
26+
) and
27+
exists(ReturnStmt s |
28+
f.getAPredecessor() = s and
29+
blame = s.getAPredecessor()
30+
)
31+
}
2832

2933
/* If a function has a value-carrying return statement, but the extractor hit a snag
3034
whilst parsing the value, then the control flow graph will not include the value.

0 commit comments

Comments
 (0)