Skip to content

Commit 6cca2d5

Browse files
committed
CPP: Autoformat.
1 parent fb5d02a commit 6cca2d5

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

cpp/ql/src/jsf/4.10 Classes/AV Rule 95.ql

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,27 @@
99
* readability
1010
* external/jsf
1111
*/
12+
1213
import cpp
1314

14-
predicate memberParameterWithDefault(MemberFunction f, int ix, Parameter p, Expr initExpr, string initValue) {
15+
predicate memberParameterWithDefault(
16+
MemberFunction f, int ix, Parameter p, Expr initExpr, string initValue
17+
) {
1518
f.getParameter(ix) = p and
1619
initExpr = p.getInitializer().getExpr() and
1720
initValue = initExpr.getValue()
1821
}
1922

20-
from Parameter p, Parameter superP, MemberFunction subF, MemberFunction superF, int i, Expr subExpr, string subValue, string superValue
21-
where memberParameterWithDefault(subF, i, p, subExpr, subValue)
22-
and subF.overrides(superF)
23-
and memberParameterWithDefault(superF, i, superP, _, superValue)
24-
and subValue != superValue
23+
from
24+
Parameter p, Parameter superP, MemberFunction subF, MemberFunction superF, int i, Expr subExpr,
25+
string subValue, string superValue
26+
where
27+
memberParameterWithDefault(subF, i, p, subExpr, subValue) and
28+
subF.overrides(superF) and
29+
memberParameterWithDefault(superF, i, superP, _, superValue) and
30+
subValue != superValue
2531
select subExpr,
26-
"Parameter " + p.getName() +
27-
" redefines its default value to " + subValue +
28-
" from the inherited default value " + superValue +
29-
" (in " + superF.getDeclaringType().getName() +
30-
").\nThe default value will be resolved statically, not by dispatch, so this can cause confusion."
32+
"Parameter " + p.getName() + " redefines its default value to " + subValue +
33+
" from the inherited default value " + superValue + " (in " +
34+
superF.getDeclaringType().getName() +
35+
").\nThe default value will be resolved statically, not by dispatch, so this can cause confusion."

0 commit comments

Comments
 (0)