Check for worthless use of valueof
See "**4.1.2 Identify worthless use of valueof**"
**Problem statement:**
A typical error during peer reviewing is that a valueof is wrongly used where it is not needed. To improve the quality of the code this kind of wrong usage should be avoided.
**New requirement specification:**
Detect worthless calls to "valueof" being applied on 'pure' variables and parameters and raise a warning accordingly.
**Examples:**
Based on example TTCN-3 code snippet below, T3Qv2 shall raise a warning for v_ToConvert
```ttcn3
module checkNoValueOfForValues {
function f_ConvertInchesToCm (float p_Inches) return float {
var float v_ValueInCm;
v_ValueInCm := p_Inches * 2.54;
return v_ValueInCm;
}
function f_Work() {
var float v_ToConvert := 2.0;
var float v_ValueCms;
var template float v_ToConvertTemplate := 2.0;
//Being a value already the call to valueof is redundant -> warning
v_ValueCms := f_ConvertInchesToCm(valueof(v_ToConvert));
//Should be ok -> no warning
v_ValueCms := f_ConvertInchesToCm(valueof(v_ToConvertTemplate));
}
//TODO: further examples with return values, parameters, etc
control {
f_Work()
}
}
```
issue