diff options
| author | gingerBill <bill@gingerbill.org> | 2022-02-28 13:39:27 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2022-02-28 13:40:01 +0000 |
| commit | 278e239973ab1e680bd36f90c069ec798930e54b (patch) | |
| tree | 2e3c1da08fd432fdae46f6ee772f9acf043002ca /src/check_decl.cpp | |
| parent | 01162e08b55406578a2972d74c472de8a14f12b8 (diff) | |
Commit rest of code for `-disallow-rtti`
Diffstat (limited to 'src/check_decl.cpp')
| -rw-r--r-- | src/check_decl.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp index 3fdd944f9..b3b1e4474 100644 --- a/src/check_decl.cpp +++ b/src/check_decl.cpp @@ -1205,6 +1205,8 @@ void check_global_variable_decl(CheckerContext *ctx, Entity *&e, Ast *type_expr, Operand o = {}; check_expr_with_type_hint(ctx, &o, init_expr, e->type); check_init_variable(ctx, e, &o, str_lit("variable declaration")); + + check_rtti_type_disallowed(e->token, e->type, "A variable declaration is using a type, %s, which has been disallowed"); } void check_proc_group_decl(CheckerContext *ctx, Entity *&pg_entity, DeclInfo *d) { |