Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Resolving overloaded 'operator ()' binding

...Ok, CPPASTFunctionCallExpression#getOverload() does it.

Looks like it should be a part of ICPPASTFunctionCallExpression.


On Wed, Aug 13, 2014 at 12:43 PM, Dmitry Petrov <dmitrynpetrov@xxxxxxxxx> wrote:
Suppose I have an ICPPASTFunctionCallExpression _expression_ representing overloaded 'operator ()' call.

Finding proper 'operator()' binding can get quite tough with all overloads, implicit casts, and so on.
I suppose CDT does something about it (otherwise it would be unable to perform type check for such expressions, and resolve bindings that depend on the type of this _expression_).

The same question can be applied to other overloaded operator calls that are represented as "regular" expressions in CDT AST.
For ICPPASTBinaryExpression (and so on), the answer is ICPPASTBinaryExpression#getOverload().
Unfortunately, there's no similar method in ICPPASTFunctionCallExpression.

Is there any code in CDT that could be reused?




Back to the top