Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
C#: Address copilots review comments.
  • Loading branch information
michaelnebel committed Sep 30, 2026
commit 8ebc37c992f2360023d635612aaa22f63da74154
1 change: 1 addition & 0 deletions csharp/ql/src/Language Abuse/SimplifyBoolExpr.ql
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ predicate rewriteBinaryExpr(BinaryOperation op, boolean value, string oldPattern
}

predicate rewriteConditionalExpr(ConditionalExpr cond, string oldPattern, string newPattern) {
cond.getCondition().getType() instanceof BoolType and
cond.getThen().getType() instanceof BoolType and
cond.getElse().getType() instanceof BoolType and
Comment thread
michaelnebel marked this conversation as resolved.
Comment thread
michaelnebel marked this conversation as resolved.
(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ void Fn()
if (true || false) ;

bool? boption = false;
if (boption == true) ; // GOOD. Cant be simplified like a regular bool
if (boption == true) ; // GOOD. Can't be simplified like a regular bool
}
}
Loading