C++: Use refactored isFirstAllocatorCallArgument()

This commit is contained in:
Calum Grant
2024-10-01 11:01:51 +01:00
parent 59a77d70c0
commit 4712ae1cfc

View File

@@ -151,7 +151,7 @@ private predicate ignoreExprOnly(Expr expr) {
// The extractor deliberately emits an `ErrorExpr` as the first argument to
// the allocator call, if any, of a `NewOrNewArrayExpr`. That `ErrorExpr`
// should not be translated.
exists(NewOrNewArrayExpr new | expr = new.getAllocatorCall().getArgument(0))
expr.(ErrorExpr).isFirstAllocatorCallArgument()
or
not translateFunction(getEnclosingFunction(expr)) and
not Raw::varHasIRFunc(getEnclosingVariable(expr))