@@ -190,15 +190,21 @@ class RegExpTerm extends RegExpParent {
190
190
191
191
Location getLocation ( ) { result = re .getLocation ( ) }
192
192
193
+ pragma [ noinline]
194
+ private predicate componentHasLocationInfo (
195
+ int i , string filepath , int startline , int startcolumn , int endline , int endcolumn
196
+ ) {
197
+ re .getComponent ( i )
198
+ .getLocation ( )
199
+ .hasLocationInfo ( filepath , startline , startcolumn , endline , endcolumn )
200
+ }
201
+
193
202
predicate hasLocationInfo (
194
203
string filepath , int startline , int startcolumn , int endline , int endcolumn
195
204
) {
196
205
exists ( int re_start , int re_end |
197
- re .getComponent ( 0 ) .getLocation ( ) .hasLocationInfo ( filepath , startline , re_start , _, _) and
198
- re .getComponent ( re .getNumberOfComponents ( ) - 1 )
199
- .getLocation ( )
200
- .hasLocationInfo ( filepath , _, _, endline , re_end )
201
- |
206
+ this .componentHasLocationInfo ( 0 , filepath , startline , re_start , _, _) and
207
+ this .componentHasLocationInfo ( re .getNumberOfComponents ( ) - 1 , filepath , _, _, endline , re_end ) and
202
208
startcolumn = re_start + start and
203
209
endcolumn = re_start + end - 1
204
210
)
0 commit comments