================
@@ -370,3 +370,61 @@ void test_file_fd_at_functions() {
(void)readlinkat(AT_FDCWD, "newpath", Buf, 10);
(void)renameat(AT_FDCWD, "oldpath", AT_FDCWD, "newpath");
}
+
+#define SSIZE_MAX_PLUS_ONE ((size_t)1 << (sizeof(size_t) * __CHAR_BIT__ - 1))
+
+void test_read_ssize_max_io_size(int fd, char *Buf) {
+ read(fd, Buf, SSIZE_MAX_PLUS_ONE); // \
+ // report-warning{{The 3rd argument to 'read' is 9223372036854775808 but
should be a value not greater than SSIZE_MAX}} \
----------------
ojhunt wrote:
Just use `@-1`,`@-2`, etc
https://github.com/llvm/llvm-project/pull/196499
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits