Rust: Repair after Unimplemented.getLocation was removed.

This commit is contained in:
Geoffrey White
2024-09-16 09:54:49 +01:00
parent ab4788a2ce
commit fb6fbf6d21
2 changed files with 23 additions and 1707 deletions

View File

@@ -6,6 +6,16 @@
import rust
/**
* Gets a location for an `Unimplemented` node.
*/
Location getUnimplementedLocation(Unimplemented node) {
result = node.(Locatable).getLocation()
or
not node instanceof Locatable and
result instanceof EmptyLocation
}
/**
* Gets `l.toString()`, but with any locations outside of the source location prefix cleaned up.
*/
@@ -29,7 +39,7 @@ string multipleString(int i) {
query predicate listUnimplemented(string location, string msg) {
// something that is not extracted yet
exists(int c |
c = strictcount(Unimplemented n | cleanLocationString(n.getLocation()) = location) and
c = strictcount(Unimplemented n | cleanLocationString(getUnimplementedLocation(n)) = location) and
msg = "Not yet implemented" + multipleString(c) + "."
)
}

File diff suppressed because it is too large Load Diff