simplify expressions that could be type-casts

This commit is contained in:
Erik Krogh Kristensen
2022-01-20 10:41:35 +01:00
parent 547f492be0
commit 4e8e3a7420
70 changed files with 123 additions and 143 deletions

View File

@@ -71,7 +71,7 @@ private DataFlow::Node getASink() { exists(DataFlow::Configuration cfg | cfg.has
* Gets all the alerts for consistency consistency checking from a configuration `conf`.
*/
private DataFlow::Node alerts(Conf conf) {
result = any(ConsistencyConfiguration res | res = conf).getAnAlert()
result = conf.(ConsistencyConfiguration).getAnAlert()
or
not exists(ConsistencyConfiguration r) and
result = getASink() and
@@ -131,7 +131,7 @@ private File getATestFile(string conf) {
result = any(LineComment comment).getFile() and
conf = ""
or
result = any(ConsistencyConfiguration res | res = conf).getAFile()
result = conf.(ConsistencyConfiguration).getAFile()
}
/**