balazske wrote:
Do you plan to commit this re-apply to the LLVM repository?
https://github.com/llvm/llvm-project/pull/82476
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro
alejandro-alvarez-sonarsource wrote:
Rebased on top of main to solve a conflict.
https://github.com/llvm/llvm-project/pull/82476
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/alejandro-alvarez-sonarsource updated
https://github.com/llvm/llvm-project/pull/82476
From a886005893585ce060415619e1fa6164ba4e1729 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alejandro=20=C3=81lvarez=20Ayll=C3=B3n?=
Date: Tue, 14 Nov 2023 09:28:45 +0100
Subject: [PATCH 01/11]
https://github.com/balazske approved this pull request.
https://github.com/llvm/llvm-project/pull/82476
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/alejandro-alvarez-sonarsource edited
https://github.com/llvm/llvm-project/pull/82476
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -5,7 +5,7 @@
// suppressed.
#pragma clang system_header
-typedef struct __sFILE {
alejandro-alvarez-sonarsource wrote:
I had to modify this line after adding `vfscanf` (and now `vfprintf`) to
`system-header-simulator-for-valist.h`
The reason is that they
@@ -65,12 +65,24 @@ void check_fseek(void) {
fclose(fp);
}
+void check_fseeko(void) {
alejandro-alvarez-sonarsource wrote:
Added
https://github.com/llvm/llvm-project/pull/82476
___
cfe-commits mailing list
https://github.com/alejandro-alvarez-sonarsource updated
https://github.com/llvm/llvm-project/pull/82476
From a21881d82fe3674b344d4a3807e9d2590c98ce93 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alejandro=20=C3=81lvarez=20Ayll=C3=B3n?=
Date: Tue, 14 Nov 2023 09:28:45 +0100
Subject: [PATCH 01/11]
@@ -5,7 +5,7 @@
// suppressed.
#pragma clang system_header
-typedef struct __sFILE {
balazske wrote:
This change looks not needed.
https://github.com/llvm/llvm-project/pull/82476
___
cfe-commits mailing list
https://github.com/balazske commented:
I have only small observations.
https://github.com/llvm/llvm-project/pull/82476
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -65,12 +65,24 @@ void check_fseek(void) {
fclose(fp);
}
+void check_fseeko(void) {
balazske wrote:
If we have these null pointer tests for all functions, `vfprintf` and `vfscanf`
could be added too.
https://github.com/llvm/llvm-project/pull/82476
https://github.com/balazske edited
https://github.com/llvm/llvm-project/pull/82476
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/alejandro-alvarez-sonarsource updated
https://github.com/llvm/llvm-project/pull/82476
From a21881d82fe3674b344d4a3807e9d2590c98ce93 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alejandro=20=C3=81lvarez=20Ayll=C3=B3n?=
Date: Tue, 14 Nov 2023 09:28:45 +0100
Subject: [PATCH 01/10]
https://github.com/alejandro-alvarez-sonarsource updated
https://github.com/llvm/llvm-project/pull/82476
From a21881d82fe3674b344d4a3807e9d2590c98ce93 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alejandro=20=C3=81lvarez=20Ayll=C3=B3n?=
Date: Tue, 14 Nov 2023 09:28:45 +0100
Subject: [PATCH 1/9]
https://github.com/alejandro-alvarez-sonarsource updated
https://github.com/llvm/llvm-project/pull/82476
From a21881d82fe3674b344d4a3807e9d2590c98ce93 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alejandro=20=C3=81lvarez=20Ayll=C3=B3n?=
Date: Tue, 14 Nov 2023 09:28:45 +0100
Subject: [PATCH 1/8]
@@ -339,3 +363,138 @@ void fflush_on_open_failed_stream(void) {
}
fclose(F);
}
+
+void test_fscanf_eof() {
alejandro-alvarez-sonarsource wrote:
Dropped.
https://github.com/llvm/llvm-project/pull/82476
___
@@ -339,3 +363,138 @@ void fflush_on_open_failed_stream(void) {
}
fclose(F);
}
+
+void test_fscanf_eof() {
+ FILE *F1 = tmpfile();
+ if (!F1)
+return;
+
+ int a;
+ unsigned b;
+ int ret = fscanf(F1, "%d %u", , );
+ char c = fgetc(F1); // expected-warning {{Read
@@ -339,3 +363,138 @@ void fflush_on_open_failed_stream(void) {
}
fclose(F);
}
+
+void test_fscanf_eof() {
+ FILE *F1 = tmpfile();
+ if (!F1)
+return;
+
+ int a;
+ unsigned b;
+ int ret = fscanf(F1, "%d %u", , );
+ char c = fgetc(F1); // expected-warning {{Read
@@ -339,3 +363,138 @@ void fflush_on_open_failed_stream(void) {
}
fclose(F);
}
+
+void test_fscanf_eof() {
+ FILE *F1 = tmpfile();
+ if (!F1)
+return;
+
+ int a;
+ unsigned b;
+ int ret = fscanf(F1, "%d %u", , );
+ char c = fgetc(F1); // expected-warning {{Read
@@ -339,3 +363,138 @@ void fflush_on_open_failed_stream(void) {
}
fclose(F);
}
+
+void test_fscanf_eof() {
+ FILE *F1 = tmpfile();
+ if (!F1)
+return;
+
+ int a;
+ unsigned b;
+ int ret = fscanf(F1, "%d %u", , );
+ char c = fgetc(F1); // expected-warning {{Read
https://github.com/alejandro-alvarez-sonarsource updated
https://github.com/llvm/llvm-project/pull/82476
From a21881d82fe3674b344d4a3807e9d2590c98ce93 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alejandro=20=C3=81lvarez=20Ayll=C3=B3n?=
Date: Tue, 14 Nov 2023 09:28:45 +0100
Subject: [PATCH 1/7]
@@ -339,3 +363,138 @@ void fflush_on_open_failed_stream(void) {
}
fclose(F);
}
+
+void test_fscanf_eof() {
+ FILE *F1 = tmpfile();
+ if (!F1)
+return;
+
+ int a;
+ unsigned b;
+ int ret = fscanf(F1, "%d %u", , );
+ char c = fgetc(F1); // expected-warning {{Read
@@ -339,3 +363,138 @@ void fflush_on_open_failed_stream(void) {
}
fclose(F);
}
+
+void test_fscanf_eof() {
+ FILE *F1 = tmpfile();
+ if (!F1)
+return;
+
+ int a;
+ unsigned b;
+ int ret = fscanf(F1, "%d %u", , );
+ char c = fgetc(F1); // expected-warning {{Read
@@ -339,3 +363,138 @@ void fflush_on_open_failed_stream(void) {
}
fclose(F);
}
+
+void test_fscanf_eof() {
+ FILE *F1 = tmpfile();
+ if (!F1)
+return;
+
+ int a;
+ unsigned b;
+ int ret = fscanf(F1, "%d %u", , );
+ char c = fgetc(F1); // expected-warning {{Read
@@ -339,3 +363,138 @@ void fflush_on_open_failed_stream(void) {
}
fclose(F);
}
+
+void test_fscanf_eof() {
balazske wrote:
Has this test a purpose that is different from test `error_fscanf` in
**stream_error.c**?
https://github.com/balazske requested changes to this pull request.
I would like better if the new tests that are invalidation-related are moved to
file **stream-invalidate.c** (this was added in the recent commit).
https://github.com/llvm/llvm-project/pull/82476
https://github.com/balazske edited
https://github.com/llvm/llvm-project/pull/82476
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -339,3 +363,138 @@ void fflush_on_open_failed_stream(void) {
}
fclose(F);
}
+
+void test_fscanf_eof() {
+ FILE *F1 = tmpfile();
+ if (!F1)
+return;
+
+ int a;
+ unsigned b;
+ int ret = fscanf(F1, "%d %u", , );
+ char c = fgetc(F1); // expected-warning {{Read
alejandro-alvarez-sonarsource wrote:
I have reduced the scope of the PR, and changed the title and the description
accordingly.
https://github.com/llvm/llvm-project/pull/82476
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/alejandro-alvarez-sonarsource edited
https://github.com/llvm/llvm-project/pull/82476
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/alejandro-alvarez-sonarsource updated
https://github.com/llvm/llvm-project/pull/82476
From a21881d82fe3674b344d4a3807e9d2590c98ce93 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alejandro=20=C3=81lvarez=20Ayll=C3=B3n?=
Date: Tue, 14 Nov 2023 09:28:45 +0100
Subject: [PATCH 1/5]
https://github.com/alejandro-alvarez-sonarsource updated
https://github.com/llvm/llvm-project/pull/82476
From a21881d82fe3674b344d4a3807e9d2590c98ce93 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alejandro=20=C3=81lvarez=20Ayll=C3=B3n?=
Date: Tue, 14 Nov 2023 09:28:45 +0100
Subject: [PATCH 1/5]
https://github.com/alejandro-alvarez-sonarsource edited
https://github.com/llvm/llvm-project/pull/82476
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
35 matches
Mail list logo