mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-27 22:02:33 +01:00
Added method_alias.carbon test so that the class export code in `ExportNameScopeToCpp` is tested. Refactored `ExportClassToCpp` so that `ExportNameScopeToCpp` can reuse that code. Moved the `identifier_info` code in `ExportNameScopeToCpp` into the namespace block, because the name scope's name ID is not valid for classes. Added a call to `CompleteType` for classes exported via `ExportNameScopeToCpp`, otherwise a "queried property of class with no definition" assert is later reached (when adding methods) in the call chain `BuildCppToCarbonThunkDecl` -> `DeclContext::addHiddenDecl` -> `CXXRecordDecl::addedMember` -> `CXXRecordDecl::data`.