@@ -48,16 +48,8 @@ private class DefOrUse extends TDefOrUse {
48
48
rnk = getRank ( this , block )
49
49
}
50
50
51
- /**
52
- * Holds if this element is at the specified location.
53
- * The location spans column `startcolumn` of line `startline` to
54
- * column `endcolumn` of line `endline` in file `filepath`.
55
- * For more information, see
56
- * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/).
57
- */
58
- abstract predicate hasLocationInfo (
59
- string filepath , int startline , int startcolumn , int endline , int endcolumn
60
- ) ;
51
+ /** Gets the location of this element. */
52
+ abstract Cpp:: Location getLocation ( ) ;
61
53
}
62
54
63
55
private Instruction toInstruction ( DefOrUse defOrUse ) {
@@ -84,11 +76,7 @@ abstract class Def extends DefOrUse {
84
76
85
77
override IRBlock getBlock ( ) { result = this .getInstruction ( ) .getBlock ( ) }
86
78
87
- override predicate hasLocationInfo (
88
- string filepath , int startline , int startcolumn , int endline , int endcolumn
89
- ) {
90
- store .getLocation ( ) .hasLocationInfo ( filepath , startline , startcolumn , endline , endcolumn )
91
- }
79
+ override Cpp:: Location getLocation ( ) { result = store .getLocation ( ) }
92
80
}
93
81
94
82
private class ExplicitDef extends Def , TExplicitDef {
@@ -134,11 +122,7 @@ abstract class Use extends DefOrUse {
134
122
135
123
override IRBlock getBlock ( ) { result = use .getUse ( ) .getBlock ( ) }
136
124
137
- override predicate hasLocationInfo (
138
- string filepath , int startline , int startcolumn , int endline , int endcolumn
139
- ) {
140
- use .getLocation ( ) .hasLocationInfo ( filepath , startline , startcolumn , endline , endcolumn )
141
- }
125
+ override Cpp:: Location getLocation ( ) { result = use .getLocation ( ) }
142
126
}
143
127
144
128
private class ExplicitUse extends Use , TExplicitUse {
0 commit comments