mirror of
https://github.com/github/codeql.git
synced 2026-04-28 10:15:14 +02:00
add explicit this to all member calls
This commit is contained in:
@@ -119,10 +119,10 @@ module Raw {
|
||||
|
||||
predicate isEntityNameNode(Entity entity) {
|
||||
exists(int index |
|
||||
TAstNode(entity) = getParentNode() and
|
||||
this = getParentNode().astNodeChild(index) and
|
||||
TAstNode(entity) = this.getParentNode() and
|
||||
this = this.getParentNode().astNodeChild(index) and
|
||||
// An entity name node must be the first child of the entity.
|
||||
index = min(int otherIndex | exists(getParentNode().astNodeChild(otherIndex))) and
|
||||
index = min(int otherIndex | exists(this.getParentNode().astNodeChild(otherIndex))) and
|
||||
entity.getName() = rawNode.(raw::VarDecl).getName()
|
||||
)
|
||||
}
|
||||
@@ -319,7 +319,7 @@ module Wrapped {
|
||||
|
||||
AstNode getChild(int index) { result = injectedChild(enclosingEntity, rawNode, index) }
|
||||
|
||||
string toString() { result = getType() }
|
||||
string toString() { result = this.getType() }
|
||||
|
||||
Raw::Location getLocation() { result = rawNode.getLocation() }
|
||||
}
|
||||
@@ -378,7 +378,7 @@ module DatabaseFeatures {
|
||||
|
||||
override string getType() { result = "javascript function" }
|
||||
|
||||
override string toString() { result = "Entity: " + getName() }
|
||||
override string toString() { result = "Entity: " + this.getName() }
|
||||
|
||||
override Location getLocation() { result = entity.getLocation() }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user