Fix compound literals for constant procedure fields

This commit is contained in:
gingerBill
2020-06-11 16:11:54 +01:00
parent 82b559c32b
commit 01d12770fa
3 changed files with 46 additions and 26 deletions

View File

@@ -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));