Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] CODAN question for function can not be resolved AND invalid arguments!

No there is no problem with codan or the parser. Codan has to have a
special checker for this case that is all.

2010/9/3 Tomasz Wesołowski <kosashi@xxxxxxxxx>:
>
> On Fri, Sep 3, 2010 at 7:55 PM, Alena Laskavaia <elaskavaia.cdt@xxxxxxxxx>
> wrote:
>>
>> There is no "binding" problem here. C functions cannot be overloaded
>> so it binds to only available function.
>> We simply do not have Semantic checker for this case - it has to be
>> different than Binding checker.
>
>
> I disagree - Codan does everything it's supposed to do in this case. Let's
> have a look on ProblemBindingChecker:69:
>
> public int visit(IASTName name) {
>     try {
>         IBinding binding = name.resolveBinding();
>         if (binding instanceof IProblemBinding) {
>
> The difference in behaviour of C files and C++ files seems to be that C++
> parser does generate the IProblemBinding for a function call with invalid
> parameters, while the C-parser doesn't (and in consequence Codan can't
> generate an error message).
> Note that the C-parser generates problem bindings in other cases, like
> unknown variable. Codan works flawlessly in those cases. Therefore, it's not
> a problem with Codan that we're talking about.
>


Back to the top