interrogate: envelop function calls in parentheses
This reduces the risk of calling a preprocessor macro instead of a method.
This commit is contained in:
parent
fb5440bd07
commit
3c9591cfbf
|
|
@ -445,15 +445,16 @@ get_call_str(const string &container, const vector_string &pexprs) const {
|
|||
} else if (_has_this && !container.empty()) {
|
||||
// If we have a "this" parameter, the calling convention is also a bit
|
||||
// different.
|
||||
call << "(";
|
||||
call << "((";
|
||||
_parameters[0]._remap->pass_parameter(call, container);
|
||||
call << ")." << _cppfunc->get_local_name();
|
||||
call << ")." << _cppfunc->get_local_name() << ")";
|
||||
|
||||
} else {
|
||||
call << "(";
|
||||
if (_cpptype != nullptr) {
|
||||
call << _cpptype->get_local_name(&parser);
|
||||
}
|
||||
call << "::" << _cppfunc->get_local_name();
|
||||
call << "::" << _cppfunc->get_local_name() << ")";
|
||||
}
|
||||
}
|
||||
call << "(";
|
||||
|
|
|
|||
Loading…
Reference in New Issue