translate-c: Improve function pointer handling
Omit address-of operator if operand is a function. Improve handling of function-call translation when using function pointers Fixes #4124
This commit is contained in:
committed by
Veikka Tuominen
parent
1adac0a55b
commit
221f1d898c
@@ -2773,6 +2773,11 @@ struct ZigClangSourceLocation ZigClangUnaryOperator_getBeginLoc(const struct Zig
|
||||
return bitcast(casted->getBeginLoc());
|
||||
}
|
||||
|
||||
struct ZigClangQualType ZigClangValueDecl_getType(const struct ZigClangValueDecl *self) {
|
||||
auto casted = reinterpret_cast<const clang::ValueDecl *>(self);
|
||||
return bitcast(casted->getType());
|
||||
}
|
||||
|
||||
const struct ZigClangExpr *ZigClangWhileStmt_getCond(const struct ZigClangWhileStmt *self) {
|
||||
auto casted = reinterpret_cast<const clang::WhileStmt *>(self);
|
||||
return reinterpret_cast<const struct ZigClangExpr *>(casted->getCond());
|
||||
|
||||
Reference in New Issue
Block a user