File tree Expand file tree Collapse file tree 5 files changed +20
-15
lines changed
cpp/ql/lib/semmle/code/cpp/ir/implementation
csharp/ql/src/experimental/ir/implementation Expand file tree Collapse file tree 5 files changed +20
-15
lines changed Original file line number Diff line number Diff line change @@ -416,9 +416,10 @@ class ThisArgumentOperand extends ArgumentOperand {
416416 // in most cases the def location makes more sense, but in some corner cases it
417417 // does not have a location: in those cases we fall back to the use location
418418 override Language:: Location getLocation ( ) {
419- if exists ( Language:: Location loc | loc = this .getAnyDef ( ) .getLocation ( ) )
420- then result = this .getAnyDef ( ) .getLocation ( )
421- else result = this .getUse ( ) .getLocation ( )
419+ result = this .getAnyDef ( ) .getLocation ( )
420+ or
421+ not exists ( this .getAnyDef ( ) .getLocation ( ) ) and
422+ result = this .getUse ( ) .getLocation ( )
422423 }
423424}
424425
Original file line number Diff line number Diff line change @@ -416,9 +416,10 @@ class ThisArgumentOperand extends ArgumentOperand {
416416 // in most cases the def location makes more sense, but in some corner cases it
417417 // does not have a location: in those cases we fall back to the use location
418418 override Language:: Location getLocation ( ) {
419- if exists ( Language:: Location loc | loc = this .getAnyDef ( ) .getLocation ( ) )
420- then result = this .getAnyDef ( ) .getLocation ( )
421- else result = this .getUse ( ) .getLocation ( )
419+ result = this .getAnyDef ( ) .getLocation ( )
420+ or
421+ not exists ( this .getAnyDef ( ) .getLocation ( ) ) and
422+ result = this .getUse ( ) .getLocation ( )
422423 }
423424}
424425
Original file line number Diff line number Diff line change @@ -416,9 +416,10 @@ class ThisArgumentOperand extends ArgumentOperand {
416416 // in most cases the def location makes more sense, but in some corner cases it
417417 // does not have a location: in those cases we fall back to the use location
418418 override Language:: Location getLocation ( ) {
419- if exists ( Language:: Location loc | loc = this .getAnyDef ( ) .getLocation ( ) )
420- then result = this .getAnyDef ( ) .getLocation ( )
421- else result = this .getUse ( ) .getLocation ( )
419+ result = this .getAnyDef ( ) .getLocation ( )
420+ or
421+ not exists ( this .getAnyDef ( ) .getLocation ( ) ) and
422+ result = this .getUse ( ) .getLocation ( )
422423 }
423424}
424425
Original file line number Diff line number Diff line change @@ -416,9 +416,10 @@ class ThisArgumentOperand extends ArgumentOperand {
416416 // in most cases the def location makes more sense, but in some corner cases it
417417 // does not have a location: in those cases we fall back to the use location
418418 override Language:: Location getLocation ( ) {
419- if exists ( Language:: Location loc | loc = this .getAnyDef ( ) .getLocation ( ) )
420- then result = this .getAnyDef ( ) .getLocation ( )
421- else result = this .getUse ( ) .getLocation ( )
419+ result = this .getAnyDef ( ) .getLocation ( )
420+ or
421+ not exists ( this .getAnyDef ( ) .getLocation ( ) ) and
422+ result = this .getUse ( ) .getLocation ( )
422423 }
423424}
424425
Original file line number Diff line number Diff line change @@ -416,9 +416,10 @@ class ThisArgumentOperand extends ArgumentOperand {
416416 // in most cases the def location makes more sense, but in some corner cases it
417417 // does not have a location: in those cases we fall back to the use location
418418 override Language:: Location getLocation ( ) {
419- if exists ( Language:: Location loc | loc = this .getAnyDef ( ) .getLocation ( ) )
420- then result = this .getAnyDef ( ) .getLocation ( )
421- else result = this .getUse ( ) .getLocation ( )
419+ result = this .getAnyDef ( ) .getLocation ( )
420+ or
421+ not exists ( this .getAnyDef ( ) .getLocation ( ) ) and
422+ result = this .getUse ( ) .getLocation ( )
422423 }
423424}
424425
You can’t perform that action at this time.
0 commit comments