diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-04-28 15:02:52 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-04-28 15:02:52 -0700 |
| commit | 9db5b2c5c6a3406e856cc024009ba8cf79f0b942 (patch) | |
| tree | e0548188f04ee974f9ab27d616d67095b308f03c /src/AstGen.zig | |
| parent | df24ce52b1059232db66e9af425a02df558aa1ca (diff) | |
| download | zig-9db5b2c5c6a3406e856cc024009ba8cf79f0b942.tar.gz zig-9db5b2c5c6a3406e856cc024009ba8cf79f0b942.zip | |
AstGen: function prototypes can have alignment
Diffstat (limited to 'src/AstGen.zig')
| -rw-r--r-- | src/AstGen.zig | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/AstGen.zig b/src/AstGen.zig index ba17a404d4..bc94431d2e 100644 --- a/src/AstGen.zig +++ b/src/AstGen.zig @@ -1041,7 +1041,9 @@ pub fn fnProtoExpr( assert(param_type_i == param_count); } - assert(fn_proto.ast.align_expr == 0); // caught by the parser + if (fn_proto.ast.align_expr != 0) { + return astgen.failNode(fn_proto.ast.align_expr, "TODO: AstGen: implement function prototypes with alignment expressions", .{}); + } assert(fn_proto.ast.section_expr == 0); // caught by the parser const maybe_bang = tree.firstToken(fn_proto.ast.return_type) - 1; |
