Skip to content

Commit eb85858

Browse files
committed
chore: applies renamed caused by main renames
1 parent bda9e12 commit eb85858

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎csharp/ql/lib/Linq/Helpers.qll‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ private int numStmts(ForEachStmt fes) {
2020
else result = 1
2121
}
2222

23-
private predicate returnsLoopVariable(ForeachStmt fes, Stmt s) {
23+
private predicate returnsLoopVariable(ForEachStmt fes, Stmt s) {
2424
exists(ReturnStmt ret |
2525
ret = s.stripSingletonBlocks() and
2626
ret.getExpr().stripImplicit().(VariableAccess).getTarget() = fes.getVariable()
@@ -29,7 +29,7 @@ private predicate returnsLoopVariable(ForeachStmt fes, Stmt s) {
2929

3030
private predicate hasNullDefault(Type t) { t.isRefType() or t instanceof NullableType }
3131

32-
private predicate returnsDefaultValueAfterForeach(ForeachStmt fes) {
32+
private predicate returnsDefaultValueAfterForeach(ForEachStmt fes) {
3333
exists(BlockStmt enclosingBlock, int i, Type elementType, ReturnStmt ret |
3434
enclosingBlock.getStmt(i) = fes and
3535
enclosingBlock.getStmt(i + 1) = ret and
@@ -218,7 +218,7 @@ predicate missedWhereOpportunity(ForEachStmtGenericEnumerable fes, IfStmt is) {
218218
* That is, the loop contains a single `if` statement that accesses the loop variable,
219219
* returns the loop variable when the condition matches, and is followed by a default return.
220220
*/
221-
predicate missedFirstOrDefaultOpportunity(ForeachStmtGenericEnumerable fes, IfStmt is) {
221+
predicate missedFirstOrDefaultOpportunity(ForEachStmtGenericEnumerable fes, IfStmt is) {
222222
// The loop only checks whether the current element is the first match.
223223
is = firstStmt(fes) and
224224
not exists(is.getElse()) and

‎csharp/ql/src/Linq/MissedFirstOrDefaultOpportunity.ql‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import csharp
1616
import Linq.Helpers
1717

18-
from ForeachStmtGenericEnumerable fes, IfStmt is
18+
from ForEachStmtGenericEnumerable fes, IfStmt is
1919
where missedFirstOrDefaultOpportunity(fes, is)
2020
select fes,
2121
"This foreach loop returns the first sequence element satisfying a $@ - consider finding the element explicitly using '.FirstOrDefault(...)'.",

0 commit comments

Comments
 (0)