diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-08-31 23:05:17 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-09-06 01:37:51 +0200 |
| commit | 4885582d162e7b91616453957b3fe6d45eee5375 (patch) | |
| tree | dd2ef22204943f5b19e9f716cb7521697bb3962e /validation | |
| parent | 51c6129e93fd26111211273dcd018426cf9df152 (diff) | |
| download | sparse-dev-4885582d162e7b91616453957b3fe6d45eee5375.tar.gz | |
return nothing only in void functions
Currently, the code for the return is only generated if the
effectively return a type or a value with a size greater than 0.
But this mean that a non-void function with an error in its return
expression is considered as a void function for what the generated
IR is concerned, making things incoherent.
Fix this by using the declared type instead of the type of the
return expression.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation')
| -rw-r--r-- | validation/linear/missing-return3.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/validation/linear/missing-return3.c b/validation/linear/missing-return3.c index 57a03a73..b32e5eea 100644 --- a/validation/linear/missing-return3.c +++ b/validation/linear/missing-return3.c @@ -11,7 +11,6 @@ static void ref(void) /* * check-name: missing-return3 * check-command: sparse -vir -flinearize=last $file - * check-known-to-fail * * check-error-start linear/missing-return3.c:4:17: error: return with no return value |
