Timm =?utf-8?q?Bäder?= <tbae...@redhat.com>,
Timm =?utf-8?q?Bäder?= <tbae...@redhat.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/83...@github.com>


tbaederr wrote:

> So ByteCodeExprGen can definitely visit statements and expressions.

Well yes, the possibility is there, but it doesn't implement any of the 
functionality when visiting statements. :)


> Can't ByteCodeStmtGen call ByteCodeExprGen::VisitBlah() so that the base 
> class could also handle situations the subclass wasn't prepared to handle?

That's what's happening in `ByteCodeStmtGen::visitStmt()` in case the statement 
is an `Expr` - `ByteCodeStmtGen` just calls `ByteCodeExprGen::discard()`.

But that's not the problem I have in mind. My problem is the other way around: 
when `ByteCodeExprGen` needs to generate code for statements. It has no 
`visitStmt` function, because that's only implemented in the subclass.


https://github.com/llvm/llvm-project/pull/83683
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to