diff options
| author | Evan Haas <evan@lagerdata.com> | 2021-08-31 13:33:44 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-09-01 17:54:07 -0700 |
| commit | f5553bfefcca2690b557ea080d8ae431b7d9b5d9 (patch) | |
| tree | c2149c305441eeb6683a28effaf4a2e680bc69ac /test | |
| parent | df589eecd61a4a2c93922302f8f486f18d0ff06b (diff) | |
| download | zig-f5553bfefcca2690b557ea080d8ae431b7d9b5d9.tar.gz zig-f5553bfefcca2690b557ea080d8ae431b7d9b5d9.zip | |
translate-c: Only consider public decls in isBuiltinDefined
Diffstat (limited to 'test')
| -rw-r--r-- | test/translate_c.zig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/translate_c.zig b/test/translate_c.zig index fb8e54d5e6..89c6bda632 100644 --- a/test/translate_c.zig +++ b/test/translate_c.zig @@ -3672,4 +3672,10 @@ pub fn addCases(cases: *tests.TranslateCContext) void { , &[_][]const u8{ \\pub const FOO = __builtin_popcount; }); + + cases.add("Only consider public decls in `isBuiltinDefined`", + \\#define FOO std + , &[_][]const u8{ + \\pub const FOO = @compileError("unable to translate macro: undefined identifier `std`"); + }); } |
