CodeQL library for C#
codeql/csharp-all 5.1.4-dev (changelog, source)
Search

Predicate isConstantCondition

Holds if e is a condition that always evaluates to Boolean value b.

Import path

import semmle.code.csharp.commons.Constants
predicate isConstantCondition(Expr e, boolean b)