Skip to content

Commit 4e7613a

Browse files
committed
unified: Remove some unnecessary checks
1 parent fd39a42 commit 4e7613a

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

unified/ql/lib/codeql/unified/internal/StaticNameBinding.qll

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,6 @@ private module FolderHeuristic {
457457
* Holds if `folder` has two or more subfolders containing a definition of `name`.
458458
*/
459459
private predicate hasConflictingDefs(Folder folder, string name) {
460-
containsDef(folder, name) and
461460
// Check for "two or more" using `exists(X) and not exists(unique(X))`
462461
containsDef(folder.getAFolder(), name) and
463462
not exists(unique(Folder child | child = folder.getAFolder() and containsDef(child, name)))
@@ -482,7 +481,6 @@ private module FolderHeuristic {
482481
result = folder
483482
or
484483
result = getOutermostNonConflictingScope(folder.getParentContainer(), name) and
485-
not isOutermostNonConflictingScope(folder, name) and
486484
containsDef(folder, name) // Prune to the subfolder actually containing the definition
487485
}
488486

0 commit comments

Comments
 (0)