C++: Use Function::hasErrors in queries

This commit is contained in:
Calum Grant
2024-10-01 11:01:23 +01:00
parent 4b5aa1497b
commit 59a77d70c0
4 changed files with 4 additions and 4 deletions

View File

@@ -49,7 +49,7 @@ predicate functionsMissingReturnStmt(Function f, ControlFlowNode blame) {
predicate functionImperfectlyExtracted(Function f) {
exists(CompilerError e | f.getBlock().getLocation().subsumes(e.getLocation()))
or
exists(ErrorExpr ee | ee.getEnclosingFunction() = f)
f.hasErrors()
or
count(f.getType()) > 1
or