diff --git a/csharp/ql/src/Bad Practices/Control-Flow/ConstantCondition.ql b/csharp/ql/src/Bad Practices/Control-Flow/ConstantCondition.ql index 386b238e049c..4e5a2821a794 100644 --- a/csharp/ql/src/Bad Practices/Control-Flow/ConstantCondition.ql +++ b/csharp/ql/src/Bad Practices/Control-Flow/ConstantCondition.ql @@ -54,11 +54,6 @@ predicate constantGuard( Guards::Guards::Guard g, string msg, Guards::Guards::Guard reason, string reasonMsg ) { ConstCondImpl::problems(g, msg, reason, reasonMsg) and - // conditional qualified expressions sit at an akward place in the CFG, which - // leads to FPs - not g.(QualifiableExpr).getQualifier() = reason and - // and if they're extension method calls, the syntactic qualifier is actually argument 0 - not g.(ExtensionMethodCall).getArgument(0) = reason and // if a logical connective is constant, one of its operands is constant, so // we report that instead not g instanceof LogicalNotExpr and diff --git a/shared/controlflow/codeql/controlflow/queries/ConstantCondition.qll b/shared/controlflow/codeql/controlflow/queries/ConstantCondition.qll index d05f2df6eff8..ef3737a5a196 100644 --- a/shared/controlflow/codeql/controlflow/queries/ConstantCondition.qll +++ b/shared/controlflow/codeql/controlflow/queries/ConstantCondition.qll @@ -69,6 +69,15 @@ module Make Cfg, InputSig Cfg, InputSig