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>


AaronBallman wrote:

> When implementing support for `StmtExpr`, I ran into a problem: there is no 
> way for `ByteCodeExprGen` to visit a statement. Previously, `ByteCodeStmtGen` 
> inherited from `ByteCodeExprGen`, so the former could visit expressions, but 
> the latter couldn't visit statements.

I'm a bit confused.
```
class ByteCodeExprGen : public ConstStmtVisitor<ByteCodeExprGen<Emitter>, bool>,
                        public Emitter {
```
So `ByteCodeExprGen` can definitely visit statements and expressions.

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

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