Jakub Konka
041f7d69f0
test/link/macho: test segment boundary symbols
2024-01-24 12:34:39 +01:00
Jakub Konka
ffd7f7f642
test/link/macho: fix naming in entry-in-dylib test
2024-01-24 12:34:39 +01:00
Jakub Konka
6cdcf61a5c
test/link/macho: upgrade and migrate dead_strip test
2024-01-24 12:34:39 +01:00
Jakub Konka
aa50bca151
test/link/elf: make invalid input file test less janky
2024-01-24 12:34:39 +01:00
Jakub Konka
56303d770e
macho: fix invalid generation of FDE records
2024-01-24 12:34:39 +01:00
Jakub Konka
11524e4d0c
test/link/macho: migrate entry_in_dylib test to new test format
2024-01-24 12:34:39 +01:00
Jakub Konka
ee68f35bfe
macho: fix section boundary symbols test
2024-01-24 12:34:39 +01:00
Veikka Tuominen
eeec34ccb6
Sema: implement comptime error return traces
2024-01-22 18:08:56 -08:00
MrDmitry
e72f1d5ae7
Extend test cases
...
Add tests for:
- packed neighboring variables
- separated neighboring variables
- mixed types of neighboring variables
2024-01-21 03:18:37 -05:00
Veikka Tuominen
2e7d28dd0d
Sema: replace uses of toUnsignedInt with toUnsignedIntAdvanced
...
During semantic analysis the value may be an unresolved lazy value
which makes using `toUnsignedInt` invalid.
Add assertions to detect similar issues in the future.
Closes #18624
2024-01-20 12:21:05 -08:00
David Rubin
1b8f7e46fa
AstGen: detect duplicate field names
...
This logic was previously in Sema, which was unnecessary complexity, and meant the issue was not detected unless the declaration was semantically analyzed. This commit finishes the work which 941090d started.
Resolves : #17916
2024-01-20 17:23:47 +00:00
Meghan Denny
46d592e485
do not enforce function parameters to be marked comptime if only called at comptime
2024-01-19 15:31:18 -08:00
David Rubin
100efcf8d3
return optional state to zirPtrCastNoDest
2024-01-19 21:25:05 +02:00
Andrew Kelley
6ecf3b1ef3
Merge pull request #18599 from dweiller/err-union-switch-err-trace
...
astgen: fix error return trace on error union switch
2024-01-18 18:32:52 -08:00
dweiller
c4cff443b8
test/stack_traces.zig: add err union switch case
2024-01-18 15:10:32 +11:00
David Rubin
6e5bdb5397
add type check to zirSwitchBlockErrUnion
2024-01-18 00:46:00 +00:00
Techatrix
ec358d6db5
sema: fix safe integer arithmetic operations on undefined values
...
Previously `@as(i64, undefined) +% 1` would produce `@as(@TypeOf(undefined), undefined)` which now gives `@as(i64, undefined)`.
Previously `@as(i64, undefined) +| 1` would hit an assertion which now gives `@as(i64, undefined)`.
2024-01-16 16:27:31 -08:00
travisstaloch
f3353708d8
AstGen: use correct token_src for switch, if and while exprs
...
fixes #18579
2024-01-16 18:22:44 +02:00
february cozzocrea
da506aaf6e
translate-c: Explicit cast bool from float fix
2024-01-16 18:12:05 +02:00
february cozzocrea
50457482b1
translate-c: Fix for compound assign implicit cast error
2024-01-16 17:57:31 +02:00
Andrew Kelley
fe870418b1
Merge pull request #18584 from Techatrix/fix-switch-on-err
...
fix ast gen failure to catch incorrect by ref error captures
2024-01-16 02:42:06 -08:00
Andrew Kelley
ca8c6dd4d6
Merge pull request #18569 from dweiller/17944-followup
...
17944 followup
2024-01-15 22:59:33 -08:00
Techatrix
06410f58bd
AstGen: properly handle ill-formed switch on error
2024-01-16 05:55:26 +01:00
Techatrix
8b9425c248
AstGen: add error message for capture error by ref in switch on error
2024-01-16 05:55:26 +01:00
dweiller
a219c9faaa
test/behavior: fix test type check for multi-ptr slice
...
The original test was checking the types of irrelevant slices, the test
is for slicing of multi-pointers _without_ an end value, but the types
of slices with an end value were being checked.
2024-01-15 20:55:01 +11:00
dweiller
8108c9f4d2
test/behavior: replace all 'comptime expect' with 'comptime assert'
2024-01-15 20:55:01 +11:00
Andrew Kelley
32e88251e4
update test case for new const/var compile error
...
commit 8afafa717f5c036595a3a781c63b6be7b478c025 was created when this
error did not exist yet.
2024-01-15 01:53:41 -07:00
Jacob Young
03ed3f56cf
Sema: fix @extern decls
...
Closes #18550
2024-01-15 07:39:05 +01:00
Jakub Konka
3dddb881bf
Merge pull request #18560 from ziglang/elf-report-dupes
...
elf: report duplicate symbol definitions
2024-01-15 07:37:09 +01:00
dweiller
8afafa717f
sema: allow slicing *T with comptime known [0..1]
2024-01-14 17:26:45 -08:00
Jakub Konka
b1ffc2b8b3
test/link/elf: patch up relocatable test
2024-01-15 00:18:50 +01:00
Jakub Konka
d7c2324cdb
test/link/elf: trigger build system bug testing relocatable mode
2024-01-14 20:51:03 +01:00
jimying
89d4ac6289
Fix minor error: std.ChildProcess.exec() already rename to run()
2024-01-13 23:23:39 -08:00
Andrew Kelley
bd46410419
Revert "Merge pull request #18410 from dweiller/by-length-slice-bug"
...
This reverts commit d9d840a33ac8abb0e616de862f592821a7f4a35e, reversing
changes made to a04d4330945565b8d6f298ace993f6954c42d0f3.
This is not an adequate implementation of the missing safety check, as
evidenced by the changes to std.json that are reverted in this commit.
Reopens #18382
Closes #18510
2024-01-13 23:21:44 -07:00
Nameless
b723296e1f
std.http: add missing documentation and a few examples
2024-01-13 18:51:38 -08:00
Meghan Denny
3d6c26525f
sema: forbid asm output to const locals
2024-01-12 16:23:42 -08:00
Andrew Kelley
30688c341b
LLVM: fix lowering of extern anyopaque
...
closes #18461
2024-01-11 01:00:49 -08:00
february cozzocrea
aafff25897
translate-c: float cast from boolean expr fix
2024-01-10 19:13:11 +00:00
Bogdan Romanyuk
4a1a5ee47b
AstGen: add error for redundant comptime var in comptime scope ( #18242 )
2024-01-09 20:09:39 -05:00
Andrew Kelley
7320b24e0e
Merge pull request #18486 from castholm/undefined-version
...
Add support for `--(no-)undefined-version`
2024-01-09 14:23:31 -08:00
Carl Åstholm
3cd646869b
Add tests for --undefined-version
2024-01-09 17:26:10 +01:00
dweiller
ec5b751373
sema: inherit block want_safety for err switch union
2024-01-09 14:42:12 +11:00
dweiller
69ab687156
test: add tests for switch_block_err_union
2024-01-09 14:42:12 +11:00
Andrew Kelley
3176fdc0b9
Merge pull request #18470 from castholm/typeInfo-sentinels
...
Make `@typeInfo` return null-terminated strings
2024-01-07 22:28:24 -08:00
Veikka Tuominen
faeb0ef032
llvm: optional slices cannot be passed in parts when they allowzero
...
Closes #18428
2024-01-08 06:57:06 +02:00
Andrew Kelley
3f6e651d5a
remove tool: update-license-headers
...
This tool is not needed since license headers were removed in
d29871977f97b50fe5e3f16cd9c68ebeba02a562.
2024-01-07 17:02:17 -07:00
Carl Åstholm
92458094c8
Fix failing type reifications
2024-01-07 16:27:50 +01:00
Veikka Tuominen
804cee3b93
categorize behavior/bugs/<issueno>.zig tests
2024-01-06 16:49:41 -08:00
Pat Tullmann
cbaaf6477f
test glibc_runtime_check: add strlcpy() check
...
The strlcpy symbol was added in v2.38, so this is a handy symbol for
creating binaries that won't run on relatively modern systems (e.g., mine,
that has glibc 2.36 installed).
2024-01-04 17:12:07 -07:00
Pat Tullmann
42d7b69d81
test/link/glibc_compat: test various older glibc versions
...
Compile, link and run a test case against various glibc versions.
Exercise symbols that have been probelmatic in the past.
2024-01-04 17:12:07 -07:00