Skip to content

Commit 78671cd

Browse files
committed
unified: Prefer 'and' instead of '|'
1 parent 828816c commit 78671cd

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,7 @@ predicate storeStep(NameBindingNode node1, string name, NameBindingNode node2) {
153153
member = cls.getAMember() and
154154
not isInstanceMember(member) and
155155
not isPrivateToLocalScope(member) and
156-
nameDecl.getDeclaration() = member
157-
|
156+
nameDecl.getDeclaration() = member and
158157
node1.isIdentifier(nameDecl) and
159158
name = nameDecl.getName() and
160159
node2.isExportedNamespace(cls)
@@ -163,8 +162,7 @@ predicate storeStep(NameBindingNode node1, string name, NameBindingNode node2) {
163162
exists(TopLevel top, Stmt stmt, NameDeclaration nameDecl |
164163
stmt = top.getBody().getAStmt() and
165164
not isPrivateToLocalScope(stmt) and
166-
nameDecl.getDeclaration() = stmt
167-
|
165+
nameDecl.getDeclaration() = stmt and
168166
node1.isIdentifier(nameDecl) and
169167
name = nameDecl.getName() and
170168
node2 = getModuleNodeFromFile(top.getFile())

0 commit comments

Comments
 (0)