https://github.com/balazske closed
https://github.com/llvm/llvm-project/pull/81842
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/81842
From 0f836d8e63f462f57784e62bcd87ac1f4f5a3d00 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Thu, 15 Feb 2024 10:56:32 +0100
Subject: [PATCH 1/3] [clang][analyzer] Change modeling of 'f
=?utf-8?q?Balázs_Kéri?=
Message-ID:
In-Reply-To:
@@ -1404,6 +1486,47 @@ void StreamChecker::evalFeofFerror(const FnDescription
*Desc,
}
}
+void StreamChecker::evalFileno(const FnDescription *Desc, const CallEvent
&Call,
+ CheckerContext &C)
=?utf-8?q?Bal=C3=A1zs_K=C3=A9ri?=
Message-ID:
In-Reply-To:
@@ -268,6 +268,16 @@ void test_clearerr(FILE *F) {
// expected-warning@-1{{FALSE}}
}
+void test_fileno(FILE *F) {
+ errno = 0;
+ int A = fileno(F);
+ clang_analyzer_eval(F != NU
=?utf-8?q?Bal=C3=A1zs_K=C3=A9ri?=
Message-ID:
In-Reply-To:
https://github.com/benshi001 approved this pull request.
https://github.com/llvm/llvm-project/pull/81842
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bi
=?utf-8?q?Balázs_Kéri?=
Message-ID:
In-Reply-To:
https://github.com/benshi001 edited
https://github.com/llvm/llvm-project/pull/81842
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
=?utf-8?q?Balázs_Kéri?=
Message-ID:
In-Reply-To:
https://github.com/NagyDonat edited
https://github.com/llvm/llvm-project/pull/81842
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
=?utf-8?q?Bal=C3=A1zs_K=C3=A9ri?=
Message-ID:
In-Reply-To:
https://github.com/NagyDonat approved this pull request.
LGTM, thanks for the update!
The new `getZeroVal()` is a nice simplification.
https://github.com/llvm/llvm-project/pull/81842
___
cf
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/81842
From 0f836d8e63f462f57784e62bcd87ac1f4f5a3d00 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Thu, 15 Feb 2024 10:56:32 +0100
Subject: [PATCH 1/2] [clang][analyzer] Change modeling of 'f
@@ -1404,6 +1486,47 @@ void StreamChecker::evalFeofFerror(const FnDescription
*Desc,
}
}
+void StreamChecker::evalFileno(const FnDescription *Desc, const CallEvent
&Call,
+ CheckerContext &C) const {
+ // Fileno should fail only if the passed
@@ -1404,6 +1486,47 @@ void StreamChecker::evalFeofFerror(const FnDescription
*Desc,
}
}
+void StreamChecker::evalFileno(const FnDescription *Desc, const CallEvent
&Call,
+ CheckerContext &C) const {
+ // Fileno should fail only if the passed
https://github.com/NagyDonat approved this pull request.
LGTM with some low priority bikeshedding in a comment.
By the way it would be good to rebase this change onto your other commit #79312
(that was merged a few hours ago) and use the "toolbox" introduced there if
that's possible.
https://
https://github.com/NagyDonat edited
https://github.com/llvm/llvm-project/pull/81842
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
balazske wrote:
Additionally code of `fflush` is moved in `StreamChecker` to a better place.
https://github.com/llvm/llvm-project/pull/81842
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com
llvmbot wrote:
@llvm/pr-subscribers-clang
@llvm/pr-subscribers-clang-static-analyzer-1
Author: Balázs Kéri (balazske)
Changes
Function 'fileno' fails only if invalid pointer is passed, this is a case that
is often ignored in source code. The failure case leads to many "false
positive" (t
https://github.com/balazske created
https://github.com/llvm/llvm-project/pull/81842
Function 'fileno' fails only if invalid pointer is passed, this is a case that
is often ignored in source code. The failure case leads to many "false
positive" (theoretically correct bug normally "should not ha
16 matches
Mail list logo