Commit 2010dae
committed
[Macros] Optimize 'rangeContainsTokenLocWithGeneratedSource'
* Early return for the direct 'true' case.
* Instead of comparing the buffer IDs, check f the entire buffer
contains the target range. This keeps 'LocCache.lastBufferID' and
improves the hit rate.
(cherry picked from commit 126ad5c)1 parent c43fa37 commit 2010dae
1 file changed
+6
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
184 | | - | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
185 | 187 | | |
186 | | - | |
187 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
188 | 191 | | |
189 | 192 | | |
190 | 193 | | |
| |||
0 commit comments