translate-c: Add compound literal support

This commit is contained in:
Evan Haas
2021-03-07 13:34:27 -08:00
committed by Veikka Tuominen
parent b988815bf0
commit c760532be0
5 changed files with 34 additions and 2 deletions

View File

@@ -2808,6 +2808,11 @@ const struct ZigClangExpr *ZigClangCompoundAssignOperator_getRHS(const struct Zi
return reinterpret_cast<const struct ZigClangExpr *>(casted->getRHS());
}
const struct ZigClangExpr *ZigClangCompoundLiteralExpr_getInitializer(const ZigClangCompoundLiteralExpr *self) {
auto casted = reinterpret_cast<const clang::CompoundLiteralExpr *>(self);
return reinterpret_cast<const ZigClangExpr *>(casted->getInitializer());
}
enum ZigClangUO ZigClangUnaryOperator_getOpcode(const struct ZigClangUnaryOperator *self) {
auto casted = reinterpret_cast<const clang::UnaryOperator *>(self);
return (ZigClangUO)casted->getOpcode();