diff options
Diffstat (limited to 'src/ir/find_all.h')
-rw-r--r-- | src/ir/find_all.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ir/find_all.h b/src/ir/find_all.h index 1abaab772..bd3d265e2 100644 --- a/src/ir/find_all.h +++ b/src/ir/find_all.h @@ -58,9 +58,11 @@ struct PointerFinder template<typename T> struct FindAllPointers { std::vector<Expression**> list; - FindAllPointers(Expression* ast) { + // Note that a pointer may be to the function->body itself, so we must + // take \ast by reference. + FindAllPointers(Expression*& ast) { PointerFinder finder; - finder.id = T()._id; + finder.id = (Expression::Id)T::SpecificId; finder.list = &list; finder.walk(ast); } |