aboutsummaryrefslogtreecommitdiff
path: root/src/checker.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2018-08-24 17:42:13 +0100
committergingerBill <bill@gingerbill.org>2018-08-24 17:42:13 +0100
commitd56f458d1168d08522584e9b426aae0c3bb18b49 (patch)
treeab21ca09b955c79d997046aa211357db2ba2696e /src/checker.cpp
parenta65eadee63828a681e07d7a99ce154b66c856d1e (diff)
Fix file scope #assert
Diffstat (limited to 'src/checker.cpp')
-rw-r--r--src/checker.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/checker.cpp b/src/checker.cpp
index c42413718..b0d6d72aa 100644
--- a/src/checker.cpp
+++ b/src/checker.cpp
@@ -2816,10 +2816,13 @@ bool collect_file_decls(CheckerContext *ctx, Array<Ast *> const &decls) {
}
case_end;
- case_ast_node(ce, CallExpr, decl);
- if (ce->proc->kind == Ast_BasicDirective) {
- Operand o = {};
- check_expr(ctx, &o, decl);
+ case_ast_node(es, ExprStmt, decl);
+ if (es->expr->kind == Ast_CallExpr) {
+ ast_node(ce, CallExpr, es->expr);
+ if (ce->proc->kind == Ast_BasicDirective) {
+ Operand o = {};
+ check_expr(ctx, &o, es->expr);
+ }
}
case_end;
}