diff options
| author | hryx <codroid@gmail.com> | 2019-05-27 14:38:09 -0700 |
|---|---|---|
| committer | hryx <codroid@gmail.com> | 2019-05-27 14:38:09 -0700 |
| commit | 3bbee1ba2e758d4bb5ea7d03b27133ffd6e4e9e2 (patch) | |
| tree | da67b9310923766c57b764b38c8325035e953991 /src/zig_clang.cpp | |
| parent | 9c437f90327880a195f1090f726118a8f6742bc6 (diff) | |
| download | zig-3bbee1ba2e758d4bb5ea7d03b27133ffd6e4e9e2.tar.gz zig-3bbee1ba2e758d4bb5ea7d03b27133ffd6e4e9e2.zip | |
expr: BitCast for ImplicitCastExpr
Diffstat (limited to 'src/zig_clang.cpp')
| -rw-r--r-- | src/zig_clang.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/zig_clang.cpp b/src/zig_clang.cpp index 6077878b29..2edfda8efa 100644 --- a/src/zig_clang.cpp +++ b/src/zig_clang.cpp @@ -1920,7 +1920,22 @@ const struct ZigClangStringLiteral *ZigClangPredefinedExpr_getFunctionName( return reinterpret_cast<const struct ZigClangStringLiteral *>(result); } +ZigClangSourceLocation ZigClangImplicitCastExpr_getBeginLoc(const struct ZigClangImplicitCastExpr *self) { + auto casted = reinterpret_cast<const clang::ImplicitCastExpr *>(self); + return bitcast(casted->getBeginLoc()); +} + enum ZigClangCK ZigClangImplicitCastExpr_getCastKind(const struct ZigClangImplicitCastExpr *self) { - auto casted = reinterpret_cast<const clang::CastExpr *>(self); + auto casted = reinterpret_cast<const clang::ImplicitCastExpr *>(self); return (ZigClangCK)casted->getCastKind(); } + +const struct ZigClangExpr *ZigClangImplicitCastExpr_getSubExpr(const struct ZigClangImplicitCastExpr *self) { + auto casted = reinterpret_cast<const clang::ImplicitCastExpr *>(self); + return reinterpret_cast<const struct ZigClangExpr *>(casted->getSubExpr()); +} + +struct ZigClangQualType ZigClangArrayType_getElementType(const struct ZigClangArrayType *self) { + auto casted = reinterpret_cast<const clang::ArrayType *>(self); + return bitcast(casted->getElementType()); +} |
