Missing return detector#
Name: missing-return
Reports functions that contain at least one execution path that does not set all return variables.
Example#
- The function does not set the return value if
x < 2
. This is a problem sincesqrt(1)
will return0
instead of1
.
Parameters#
The detector does not accept any additional parameters.