aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2020-03-26 15:56:55 +0000
committergingerBill <bill@gingerbill.org>2020-03-26 15:56:55 +0000
commitdd69fcba07aaeefad04ca0b44715ec9d570b46d5 (patch)
tree9e696c1f1fa7e30f10e32f51a196aa464f479ca0 /src/check_expr.cpp
parentb7893082ce138f5670d52b6c267d0a6599694166 (diff)
parent7909872877fd5c82c29df711f160838a7a4e59e1 (diff)
Merge branch 'master' into llvm-integration
Diffstat (limited to 'src/check_expr.cpp')
-rw-r--r--src/check_expr.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp
index 69e79ccaf..cda9debfa 100644
--- a/src/check_expr.cpp
+++ b/src/check_expr.cpp
@@ -1653,6 +1653,11 @@ bool check_is_not_addressable(CheckerContext *c, Operand *o) {
return false;
}
+ Ast *expr = unparen_expr(o->expr);
+ if (expr->kind == Ast_CompoundLit) {
+ return false;
+ }
+
if (o->mode != Addressing_Variable) {
return true;
}