aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/check_expr.cpp')
-rw-r--r--src/check_expr.cpp3
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));