Skip to content

Commit 2be5c38

Browse files
committed
Java: Address comments.
1 parent 312c573 commit 2be5c38

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

java/ql/src/semmle/code/java/dataflow/internal/DataFlowPrivate.qll

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ class DataFlowCall extends Call {
286286
ExprNode getNode() { result.getExpr() = this }
287287
}
288288

289-
/** Holds if `e` is an expression that always has the same boolean value `val`. */
289+
/** Holds if `e` is an expression that always has the same Boolean value `val`. */
290290
private predicate constantBooleanExpr(Expr e, boolean val) {
291291
e.(CompileTimeConstantExpr).getBooleanValue() = val
292292
or
@@ -297,11 +297,11 @@ private predicate constantBooleanExpr(Expr e, boolean val) {
297297
)
298298
}
299299

300-
/** An expression that always has the same boolean value. */
301-
class ConstantBooleanExprNode extends ArgumentNode, ExprNode {
302-
ConstantBooleanExprNode() { constantBooleanExpr(this.getExpr(), _) }
300+
/** An argument that always has the same Boolean value. */
301+
private class ConstantBooleanArgumentNode extends ArgumentNode, ExprNode {
302+
ConstantBooleanArgumentNode() { constantBooleanExpr(this.getExpr(), _) }
303303

304-
/** Gets the boolean value of this expression. */
304+
/** Gets the Boolean value of this expression. */
305305
boolean getBooleanValue() { constantBooleanExpr(this.getExpr(), result) }
306306
}
307307

@@ -311,7 +311,8 @@ class ConstantBooleanExprNode extends ArgumentNode, ExprNode {
311311
cached
312312
predicate isUnreachableInCall(Node n, DataFlowCall call) {
313313
exists(
314-
ExplicitParameterNode paramNode, ConstantBooleanExprNode arg, SsaImplicitInit param, Guard guard
314+
ExplicitParameterNode paramNode, ConstantBooleanArgumentNode arg, SsaImplicitInit param,
315+
Guard guard
315316
|
316317
// get constant bool argument and parameter for this call
317318
viableParamArg(call, paramNode, arg) and

0 commit comments

Comments
 (0)