aboutsummaryrefslogtreecommitdiff
path: root/src/zig_clang.cpp
diff options
context:
space:
mode:
authorEvan Haas <evan@lagerdata.com>2021-03-07 13:34:27 -0800
committerVeikka Tuominen <git@vexu.eu>2021-03-08 10:09:12 +0200
commitc760532be04667c8a8d49a7cf1b7582da3d1632d (patch)
tree01b4338c4d686ba9b41e5783603d52cb80605fc3 /src/zig_clang.cpp
parentb988815bf0771dd86a345ce8ed8b0d3eb9d6f55e (diff)
downloadzig-c760532be04667c8a8d49a7cf1b7582da3d1632d.tar.gz
zig-c760532be04667c8a8d49a7cf1b7582da3d1632d.zip
translate-c: Add compound literal support
Diffstat (limited to 'src/zig_clang.cpp')
-rw-r--r--src/zig_clang.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/zig_clang.cpp b/src/zig_clang.cpp
index 0ddb597371..b789df0764 100644
--- a/src/zig_clang.cpp
+++ b/src/zig_clang.cpp
@@ -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();