implement review suggestions

This commit is contained in:
Paolo Tranquilli
2021-11-23 12:27:57 +00:00
committed by GitHub
parent 8b44d5c39e
commit e99a040884
5 changed files with 20 additions and 15 deletions

View File

@@ -416,9 +416,10 @@ class ThisArgumentOperand extends ArgumentOperand {
// in most cases the def location makes more sense, but in some corner cases it
// does not have a location: in those cases we fall back to the use location
override Language::Location getLocation() {
if exists(Language::Location loc | loc = this.getAnyDef().getLocation())
then result = this.getAnyDef().getLocation()
else result = this.getUse().getLocation()
result = this.getAnyDef().getLocation()
or
not exists(this.getAnyDef().getLocation()) and
result = this.getUse().getLocation()
}
}

View File

@@ -416,9 +416,10 @@ class ThisArgumentOperand extends ArgumentOperand {
// in most cases the def location makes more sense, but in some corner cases it
// does not have a location: in those cases we fall back to the use location
override Language::Location getLocation() {
if exists(Language::Location loc | loc = this.getAnyDef().getLocation())
then result = this.getAnyDef().getLocation()
else result = this.getUse().getLocation()
result = this.getAnyDef().getLocation()
or
not exists(this.getAnyDef().getLocation()) and
result = this.getUse().getLocation()
}
}

View File

@@ -416,9 +416,10 @@ class ThisArgumentOperand extends ArgumentOperand {
// in most cases the def location makes more sense, but in some corner cases it
// does not have a location: in those cases we fall back to the use location
override Language::Location getLocation() {
if exists(Language::Location loc | loc = this.getAnyDef().getLocation())
then result = this.getAnyDef().getLocation()
else result = this.getUse().getLocation()
result = this.getAnyDef().getLocation()
or
not exists(this.getAnyDef().getLocation()) and
result = this.getUse().getLocation()
}
}

View File

@@ -416,9 +416,10 @@ class ThisArgumentOperand extends ArgumentOperand {
// in most cases the def location makes more sense, but in some corner cases it
// does not have a location: in those cases we fall back to the use location
override Language::Location getLocation() {
if exists(Language::Location loc | loc = this.getAnyDef().getLocation())
then result = this.getAnyDef().getLocation()
else result = this.getUse().getLocation()
result = this.getAnyDef().getLocation()
or
not exists(this.getAnyDef().getLocation()) and
result = this.getUse().getLocation()
}
}

View File

@@ -416,9 +416,10 @@ class ThisArgumentOperand extends ArgumentOperand {
// in most cases the def location makes more sense, but in some corner cases it
// does not have a location: in those cases we fall back to the use location
override Language::Location getLocation() {
if exists(Language::Location loc | loc = this.getAnyDef().getLocation())
then result = this.getAnyDef().getLocation()
else result = this.getUse().getLocation()
result = this.getAnyDef().getLocation()
or
not exists(this.getAnyDef().getLocation()) and
result = this.getUse().getLocation()
}
}