mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 21:20:11 +01:00
This allows Clang to correctly generate the vtable for the exported class. There's still something wrong with new virtual functions in the Carbon type (left a TODO) - I thought it might be related to not flagging the CXXMethodDecl as virtual, but my initial experiments don't seem to back that up, so I'll look into it further separately. There's also a test regression due to an virtual (well, abstract specifically, but I think it'd happen with a virtual one too) function in an abstract class taking `self` by value being rejected since the abstract class can't be instantiated. Not sure if this is a correct change - the test's behavior could be preserved by using `ref self` instnead of `self` in this function. Is that reasonable/expected? Should we not require a type to be complete when passing by value if we can compute the value representation without such completeness? --------- Co-authored-by: Richard Smith <richard@metafoo.co.uk>