diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2019-01-21 01:23:17 +0100 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2019-09-26 18:10:44 +0200 |
| commit | 233e61d2cfe5fbdaf6de482afebc483ac196f353 (patch) | |
| tree | 85c0750a9fc5f2139656a24b19e8e9a7d0a7890b /validation | |
| parent | 7a3cc9608ed2531f7fa0b6704c27bdddaa5053b7 (diff) | |
| download | sparse-dev-233e61d2cfe5fbdaf6de482afebc483ac196f353.tar.gz | |
expand: add missing expansion of compound literals
Compound literals, like all other expressions, need to be be
expanded before linearization, but this is currently not done.
As consequence, some builtins are unexpectedly still present,
same for EXPR_TYPEs, ... with error messages like:
warning: unknown expression
at linearization.
Fix this by adding the missing expansion of compound literals.
Note: as explained in the code itself, it's not totally clear
how compound literals can be identified after evaluation.
The code here consider all anonymous symbols with an
initializer as being a compound literal.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation')
| -rw-r--r-- | validation/expand/compound-literal.c | 1 | ||||
| -rw-r--r-- | validation/linear/compound-literal02.c | 1 |
2 files changed, 0 insertions, 2 deletions
diff --git a/validation/expand/compound-literal.c b/validation/expand/compound-literal.c index 7401b019..034164bc 100644 --- a/validation/expand/compound-literal.c +++ b/validation/expand/compound-literal.c @@ -13,7 +13,6 @@ static void foo(struct s *p) /* * check-name: compound-literal * check-command: test-linearize $file - * check-known-to-fail * * check-output-start foo: diff --git a/validation/linear/compound-literal02.c b/validation/linear/compound-literal02.c index 87b98d76..6ed5809e 100644 --- a/validation/linear/compound-literal02.c +++ b/validation/linear/compound-literal02.c @@ -13,7 +13,6 @@ int bar(void) * check-name: compound-literal02.c * check-command: test-linearize -Wno-decl $file * - * check-known-to-fail * check-output-ignore * check-output-contains: ret\\..*\\$6 */ |
