diff options
| author | gingerBill <bill@gingerbill.org> | 2020-06-11 16:11:54 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-06-11 16:11:54 +0100 |
| commit | 01d12770fac3138f3d406a6fd1660018fd0f7e27 (patch) | |
| tree | fcfb8ea84e2a04af3d498bc8e2a05f073fc18cdd /src/check_expr.cpp | |
| parent | 82b559c32b7afd9d8dd265f6541ba0f8e81345f4 (diff) | |
Fix compound literals for constant procedure fields
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 059ed917d..fa25fd899 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -7761,6 +7761,9 @@ bool check_range(CheckerContext *c, Ast *node, Operand *x, Operand *y, ExactValu } bool check_is_operand_compound_lit_constant(CheckerContext *c, Operand *o) { + if (is_operand_nil(*o)) { + return true; + } Ast *expr = unparen_expr(o->expr); if (expr != nullptr) { Entity *e = strip_entity_wrapping(entity_from_expr(expr)); |