Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Some questions about CDT

This approach has been tried in the past by another user, but the commit was abandoned because some tests failed, showing a breaking of current behavior. So I don't know if it's possible to apply today this kind of behavior keeping backward compatibility, I can take a look again however.

Il mer 19 giu 2019, 20:02 Nathan Ridge <zeratul976@xxxxxxxxxxx> ha scritto:
> 1) Bug 545877 - Don't take into account init var values in CFG: CDT
> Codan doesn't implement a data flow analysis, it means some checks like
> variable initialization, always true/false conditions, dead code, can't
> be properly detected. With my commit I just restricted the "scope",
> Codan is more reliable about these cases because at the end it takes
> these decisions only if the variable is const. Sometimes ago Elena
> Laskavaia said that she was not really agree with this kind of policy,
> but it seems Elena abandoned CDT project (if you read this message, your
> feedback is welcome!). Actually I'm not agree with her point of view but
> it's just my opinion. So the question: what we want to do here? If the
> current policy is ok for the community I can abandon my commit.

My opinion on this is that we should only report the initial value of a variable as its current value if the variable is constant, and that we should do this consistently, rather than having conditional logic to e.g. only do this for CFG building.

If anyone feels strongly that the status quo behaviour (where we always report the initial value of a variable as its current value) is preferable, please speak up in this thread.

Thanks,
Nate
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev

Back to the top