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

> 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

Back to the top