diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2019-01-18 14:44:29 +0100 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2019-02-28 21:04:20 +0100 |
| commit | 7f1ea3b67e7f77f8f87340eefd71c79fe2b37614 (patch) | |
| tree | 37d9708fce75df14344267756f561787a2e58929 /validation | |
| parent | 8095f18a5f9e2ed69cec94f534ec56d982699581 (diff) | |
| download | sparse-dev-7f1ea3b67e7f77f8f87340eefd71c79fe2b37614.tar.gz | |
display extra info for type errors in compare & conditional
For "incompatible types in comparison expression" errors, only the
kind of type difference is displayed. Displaying the types would
make easier to find the cause of the problem. The same is true
for ternary conditionals.
So, also display the left & right types.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation')
| -rw-r--r-- | validation/cond-err-expand.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/validation/cond-err-expand.c b/validation/cond-err-expand.c index 7936a2d0..b52624bc 100644 --- a/validation/cond-err-expand.c +++ b/validation/cond-err-expand.c @@ -18,8 +18,12 @@ void bar(void) * check-command: test-linearize -Wno-decl $file * * check-error-start -cond-err-expand.c:8:11: error: incompatible types in conditional expression (different base types) -cond-err-expand.c:13:11: error: incompatible types in conditional expression (different base types) +cond-err-expand.c:8:11: error: incompatible types in conditional expression (different base types): +cond-err-expand.c:8:11: int +cond-err-expand.c:8:11: void +cond-err-expand.c:13:11: error: incompatible types in conditional expression (different base types): +cond-err-expand.c:13:11: void +cond-err-expand.c:13:11: int * check-error-end * * check-output-ignore |
