Skip to content

Commit e3e434f

Browse files
committed
Correct nullability of free() redeclaration
In the new clang, this declaration ends up influencing the redeclaration chain, altering the nullability of the `free(_:)` function imported into Swift. Fixes rdar://71269128. Note that tests may fail unless a clean build is performed.
1 parent 72974a0 commit e3e434f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/public/SwiftShims/LibcShims.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ __swift_size_t _swift_stdlib_fwrite_stdout(const void *ptr, __swift_size_t size,
4343
// General utilities <stdlib.h>
4444
// Memory management functions
4545
static inline void _swift_stdlib_free(void *_Nullable ptr) {
46-
extern void free(void *);
46+
extern void free(void *_Nullable);
4747
free(ptr);
4848
}
4949

0 commit comments

Comments
 (0)