https://github.com/benshi001 created
https://github.com/llvm/llvm-project/pull/76207
None
>From a7fed7e081981b1c7c6c41dd72f0bc0736260754 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Fri, 22 Dec 2023 14:47:48 +0800
Subject: [PATCH] [clang][analyzer] Improve modeling of `fileno` in the
StreamCh
benshi001 wrote:
`fileno` and `ftell` are quite similar,
1. both of them return `0` on success, and `-1` on failure.
2. both of them set `errno` on failure.
The differences are
1. `fileno` returns `int` type but `ftell` returns `long` type.
2. `ftell` will not affect the value of `error` on s
benshi001 wrote:
The reported format error is in another file, not related to my patch.
https://github.com/llvm/llvm-project/pull/76207
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Ben Shi
Date: 2023-12-22T15:34:13+08:00
New Revision: e2d0f50cd6f2887c32508faba54a9a9499576a4e
URL:
https://github.com/llvm/llvm-project/commit/e2d0f50cd6f2887c32508faba54a9a9499576a4e
DIFF:
https://github.com/llvm/llvm-project/commit/e2d0f50cd6f2887c32508faba54a9a9499576a4e.diff
LOG:
https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/76207
>From 0a46fedc497a124d3aca4295b8c18ae60df186e9 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Fri, 22 Dec 2023 14:47:48 +0800
Subject: [PATCH] [clang][analyzer] Improve modeling of `fileno` in the
StreamChecker
https://github.com/benshi001 closed
https://github.com/llvm/llvm-project/pull/76207
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/benshi001 created
https://github.com/llvm/llvm-project/pull/76557
None
>From 2eebb462b8a7865684d3baaffbad7560eed10e57 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Fri, 29 Dec 2023 16:44:47 +0800
Subject: [PATCH] [clang][analyzer] Support 'fflush' in the
StdLibraryFunctionsC
https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/76557
>From 2eebb462b8a7865684d3baaffbad7560eed10e57 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Fri, 29 Dec 2023 16:44:47 +0800
Subject: [PATCH 1/3] [clang][analyzer] Support 'fflush' in the
StdLibraryFunctionsChe
benshi001 wrote:
> Looks good to me, my only nitpick is that perhaps you could use more
> descriptive test names instead of using `_0` and `_1` suffixes.
>
> Also, perhaps wait a bit (until next year ;) ) before merging this to give
> other reviewers a chance to look at it.
Thanks for your su
benshi001 wrote:
> ~please also update the release notes~ EDIT: Done.
Thanks for your support!
https://github.com/llvm/llvm-project/pull/76557
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-
https://github.com/benshi001 created
https://github.com/llvm/llvm-project/pull/76561
According to https://www.nongnu.org/avr-libc/user-manual/inline_asm.html, "G"
only represent a float constraint "0.0". And avr-gcc also rejects other
non-zero values.
>From 0a29621f6c6808668ada014313083f45a60
https://github.com/benshi001 closed
https://github.com/llvm/llvm-project/pull/76557
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
benshi001 wrote:
Thanks for your help. Happy new year!
https://github.com/llvm/llvm-project/pull/76557
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
benshi001 wrote:
As I have suggested, any functional change need tests. So I think you need to
add some tests to show what your changes affect.
https://github.com/llvm/llvm-project/pull/72298
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
htt
benshi001 wrote:
Please refer to my previous commit of AVR ABI, how tests are provided for a
functional change.
https://github.com/llvm/llvm-project/pull/72298
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mail
https://github.com/benshi001 created
https://github.com/llvm/llvm-project/pull/76671
None
>From e776bdf419556917463a1fdc978fac8fd8b89aaf Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Mon, 1 Jan 2024 18:48:27 +0800
Subject: [PATCH] [clang][analyzer] Improve 'errno' modeling of 'mkdtemp'
---
..
https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/76671
>From 0c586914ac977920140472d172ee357dea43f2c5 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Mon, 1 Jan 2024 18:48:27 +0800
Subject: [PATCH] [clang][analyzer] Improve 'errno' modeling of 'mkdtemp'
---
.../Chec
https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/76561
>From 66a786a0353d8ae88006e585861fcb2035797032 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Fri, 29 Dec 2023 17:58:21 +0800
Subject: [PATCH] [clang][AVR] Restrict range of assembly constraint 'G'
According to
https://github.com/benshi001 edited
https://github.com/llvm/llvm-project/pull/76561
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
benshi001 wrote:
> LGTM
Thanks for your help!
https://github.com/llvm/llvm-project/pull/76671
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/76561
>From 75164dccb2697ad5468700a9f23a0bc7d8ab49e8 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Fri, 29 Dec 2023 17:58:21 +0800
Subject: [PATCH] [clang][AVR] Restrict range of assembly constraint 'G'
According to
https://github.com/benshi001 edited
https://github.com/llvm/llvm-project/pull/76561
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
benshi001 wrote:
I am not familiar with swift. So is there an official document for the SWIFT
specific ABI on AVR? I think this is necessary, just like C++:
https://gcc.gnu.org/wiki/avr-gcc.
And what's more, tests are required to be committed with functional changes,
this is a requirement for
https://github.com/benshi001 created
https://github.com/llvm/llvm-project/pull/76776
None
>From 8a7caba467e121290d36ad75626ea95ea47b41f2 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Wed, 3 Jan 2024 11:30:57 +0800
Subject: [PATCH] [clang][analyzer] Support 'fdopen' in the StreamChecker
---
cl
https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/76776
>From 19122ac9df0e621ffb25fcb64bfad2336476b94b Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Wed, 3 Jan 2024 11:30:57 +0800
Subject: [PATCH] [clang][analyzer] Support 'fdopen' in the StreamChecker
---
clang/do
https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/76671
>From 0c586914ac977920140472d172ee357dea43f2c5 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Mon, 1 Jan 2024 18:48:27 +0800
Subject: [PATCH 1/2] [clang][analyzer] Improve 'errno' modeling of 'mkdtemp'
---
.../
@@ -2511,10 +2511,12 @@ void StdLibraryFunctionsChecker::initFunctionSummaries(
.ArgConstraint(NotNull(ArgNo(0;
// char *mkdtemp(char *template);
-// FIXME: Improve for errno modeling.
addToFunctionSummaryMap(
"mkdtemp", Signature(ArgTypes
https://github.com/benshi001 closed
https://github.com/llvm/llvm-project/pull/76671
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
benshi001 wrote:
> No release notes?
Sorry, I forget to pull your modification to my local repo, I will fix this
soon.
https://github.com/llvm/llvm-project/pull/76671
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-
https://github.com/benshi001 created
https://github.com/llvm/llvm-project/pull/76805
None
>From c037cab9ef925d902a34a173244826e5cf797800 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Wed, 3 Jan 2024 18:50:16 +0800
Subject: [PATCH] [clang][analyzer][NFC] Improve release note
---
clang/docs/Rel
benshi001 wrote:
> No release notes?
I have created another PR to add the miss release note.
https://github.com/llvm/llvm-project/pull/76805
https://github.com/llvm/llvm-project/pull/76671
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http
https://github.com/benshi001 closed
https://github.com/llvm/llvm-project/pull/76805
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
benshi001 wrote:
@steakhal What is your opinion on this change ?
https://github.com/llvm/llvm-project/pull/76776
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/benshi001 closed
https://github.com/llvm/llvm-project/pull/76561
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/benshi001 closed
https://github.com/llvm/llvm-project/pull/76776
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
benshi001 wrote:
> One note that should be added to the documentation: The `StreamChecker` does
> not handle file descriptors associated to streams. Therefore some issues can
> appear, for example `fileno` does not return the value that was used to open
> a stream with `fdopen`, and the standa
https://github.com/benshi001 created
https://github.com/llvm/llvm-project/pull/77040
1. Improve the 'errno' modeling.
2. Improve the buffer size argument's constraint.
>From ab7f635446f8277ef305e606ca6973860755e316 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Fri, 5 Jan 2024 10:05:15 +0800
Sub
https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/77040
>From 10a0e9aae5effdd6e26476e78a778b89373358df Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Fri, 5 Jan 2024 10:05:15 +0800
Subject: [PATCH] Improve modeling of 'getcwd' in the
StdLibraryFunctionsChecker
1. Im
https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/77040
>From 10a0e9aae5effdd6e26476e78a778b89373358df Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Fri, 5 Jan 2024 10:05:15 +0800
Subject: [PATCH 1/2] Improve modeling of 'getcwd' in the
StdLibraryFunctionsChecker
1
https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/77040
>From 10a0e9aae5effdd6e26476e78a778b89373358df Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Fri, 5 Jan 2024 10:05:15 +0800
Subject: [PATCH 1/3] Improve modeling of 'getcwd' in the
StdLibraryFunctionsChecker
1
https://github.com/benshi001 closed
https://github.com/llvm/llvm-project/pull/77040
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/benshi001 created
https://github.com/llvm/llvm-project/pull/77435
None
>From 0ff61f497b99b45b1697289cf5d44fb3ecab2aba Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Tue, 9 Jan 2024 17:48:02 +0800
Subject: [PATCH] [clang][analyzer] Implement modeling of 'fputc' in the
StdLibra
benshi001 wrote:
> I have already a patch to add these functions: #76979. The conditions for
> `fputc` are not the same, this can be clarified at the other patch.
I see. It would be better to close this PR, and supplement my parts in your PR.
https://github.com/llvm/llvm-project/pull/77435
___
https://github.com/benshi001 closed
https://github.com/llvm/llvm-project/pull/77435
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/benshi001 created
https://github.com/llvm/llvm-project/pull/77576
According to https://pubs.opengroup.org/onlinepubs/9699919799/, the return
value of 'ftell' is not restricted to > 0, and may return 0 in real world.
And the corresponding unit test also show `Ret >= 0` not `R
https://github.com/benshi001 edited
https://github.com/llvm/llvm-project/pull/77576
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/benshi001 created
https://github.com/llvm/llvm-project/pull/77580
None
>From cb79cad6837dba5d33476c65923ec714507a3fef Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Wed, 10 Jan 2024 19:00:27 +0800
Subject: [PATCH] [clang][analyzer] Support 'tello' and 'fseeko' in the
StreamCh
https://github.com/benshi001 closed
https://github.com/llvm/llvm-project/pull/77576
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/77580
>From cb79cad6837dba5d33476c65923ec714507a3fef Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Wed, 10 Jan 2024 19:00:27 +0800
Subject: [PATCH 1/2] [clang][analyzer] Support 'tello' and 'fseeko' in the
StreamChec
benshi001 wrote:
> `Call.getResultType()`
This is fixed. Thanks!
https://github.com/llvm/llvm-project/pull/77580
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
benshi001 wrote:
> It is better to replace in code of `evalFtell` the `C.getASTContext().LongTy`
> with `Call.getResultType()` (occurs 2 times), this is more exact if `off_t`
> is defined to something else than `long`.
This has been fixed. Thanks!
https://github.com/llvm/llvm-project/pull/775
https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/77580
>From cb79cad6837dba5d33476c65923ec714507a3fef Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Wed, 10 Jan 2024 19:00:27 +0800
Subject: [PATCH 1/2] [clang][analyzer] Support 'tello' and 'fseeko' in the
StreamChec
https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/77580
>From cb79cad6837dba5d33476c65923ec714507a3fef Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Wed, 10 Jan 2024 19:00:27 +0800
Subject: [PATCH 1/3] [clang][analyzer] Support 'tello' and 'fseeko' in the
StreamChec
https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/77580
>From cb79cad6837dba5d33476c65923ec714507a3fef Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Wed, 10 Jan 2024 19:00:27 +0800
Subject: [PATCH 1/4] [clang][analyzer] Support 'tello' and 'fseeko' in the
StreamChec
benshi001 wrote:
> Sure thing @benshi001 ... I'll create tests. The Swift ABI is documented
> here: https://github.com/apple/swift/blob/main/docs/ABI/CallingConvention.rst
>
> I don't think this change will actually change any ABI. All my code uses the
> normal avr-gcc ABI you referenced.
>
>
https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/77580
>From cb79cad6837dba5d33476c65923ec714507a3fef Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Wed, 10 Jan 2024 19:00:27 +0800
Subject: [PATCH 1/5] [clang][analyzer] Support 'tello' and 'fseeko' in the
StreamChec
https://github.com/benshi001 closed
https://github.com/llvm/llvm-project/pull/77580
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: KOLANICH
Date: 2022-07-07T22:45:21+08:00
New Revision: 2d01a8572076a93fa40c4af934e78a859f3096ee
URL:
https://github.com/llvm/llvm-project/commit/2d01a8572076a93fa40c4af934e78a859f3096ee
DIFF:
https://github.com/llvm/llvm-project/commit/2d01a8572076a93fa40c4af934e78a859f3096ee.diff
LOG:
Author: Ben Shi
Date: 2022-03-24T02:08:22Z
New Revision: 51585aa240de6ef07979345de5406483d7393b7b
URL:
https://github.com/llvm/llvm-project/commit/51585aa240de6ef07979345de5406483d7393b7b
DIFF:
https://github.com/llvm/llvm-project/commit/51585aa240de6ef07979345de5406483d7393b7b.diff
LOG: [clan
Author: Ben Shi
Date: 2022-03-24T03:41:01Z
New Revision: 86c1d075bb32101fe1c403e873ce33945bfa9626
URL:
https://github.com/llvm/llvm-project/commit/86c1d075bb32101fe1c403e873ce33945bfa9626
DIFF:
https://github.com/llvm/llvm-project/commit/86c1d075bb32101fe1c403e873ce33945bfa9626.diff
LOG: [clan
Author: Ben Shi
Date: 2022-03-25T01:43:41Z
New Revision: b62ea9b38b627ce2a96f66242c15250d59a9b134
URL:
https://github.com/llvm/llvm-project/commit/b62ea9b38b627ce2a96f66242c15250d59a9b134
DIFF:
https://github.com/llvm/llvm-project/commit/b62ea9b38b627ce2a96f66242c15250d59a9b134.diff
LOG: [AVR]
Author: Ben Shi
Date: 2022-03-29T12:05:21+08:00
New Revision: 50de68bc2ffc8f6825fb5445ec179a68aa6ad219
URL:
https://github.com/llvm/llvm-project/commit/50de68bc2ffc8f6825fb5445ec179a68aa6ad219
DIFF:
https://github.com/llvm/llvm-project/commit/50de68bc2ffc8f6825fb5445ec179a68aa6ad219.diff
LOG:
Author: Matt Jacobson
Date: 2021-07-30T08:25:14+08:00
New Revision: 1e6a93f15c7ea890c876a3a10c7e3970a1710dff
URL:
https://github.com/llvm/llvm-project/commit/1e6a93f15c7ea890c876a3a10c7e3970a1710dff
DIFF:
https://github.com/llvm/llvm-project/commit/1e6a93f15c7ea890c876a3a10c7e3970a1710dff.diff
Author: Ben Shi
Date: 2022-03-23T02:00:15Z
New Revision: 6edfe45a63125a8938a5bea13534a118b0e31023
URL:
https://github.com/llvm/llvm-project/commit/6edfe45a63125a8938a5bea13534a118b0e31023
DIFF:
https://github.com/llvm/llvm-project/commit/6edfe45a63125a8938a5bea13534a118b0e31023.diff
LOG: [AVR]
Author: Patryk Wychowaniec
Date: 2022-04-11T02:42:13Z
New Revision: d16a631c124fdc27dd33037a826804ebf21dc582
URL:
https://github.com/llvm/llvm-project/commit/d16a631c124fdc27dd33037a826804ebf21dc582
DIFF:
https://github.com/llvm/llvm-project/commit/d16a631c124fdc27dd33037a826804ebf21dc582.diff
Author: Ben Shi
Date: 2022-05-02T04:37:57Z
New Revision: 42fa5bae7afcd58f769adfd46d15996eeb0381ad
URL:
https://github.com/llvm/llvm-project/commit/42fa5bae7afcd58f769adfd46d15996eeb0381ad
DIFF:
https://github.com/llvm/llvm-project/commit/42fa5bae7afcd58f769adfd46d15996eeb0381ad.diff
LOG: [clan
Author: Ben Shi
Date: 2022-05-06T13:46:49Z
New Revision: 3902ebdd5793763431264259dfdca871ef453017
URL:
https://github.com/llvm/llvm-project/commit/3902ebdd5793763431264259dfdca871ef453017
DIFF:
https://github.com/llvm/llvm-project/commit/3902ebdd5793763431264259dfdca871ef453017.diff
LOG: [comp
Author: Ben Shi
Date: 2022-05-10T02:27:56Z
New Revision: 88c336d8eff03fc59a669c9ae4f2e415d95ff07c
URL:
https://github.com/llvm/llvm-project/commit/88c336d8eff03fc59a669c9ae4f2e415d95ff07c
DIFF:
https://github.com/llvm/llvm-project/commit/88c336d8eff03fc59a669c9ae4f2e415d95ff07c.diff
LOG: [clan
https://github.com/benshi001 created
https://github.com/llvm/llvm-project/pull/85921
None
>From 144119d57d181fb16e27a5c7d869422a39185978 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Wed, 20 Mar 2024 19:36:50 +0800
Subject: [PATCH] [clang][AST][NFC] Add '[[fallthrough]];' to cases fall
through
https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/85921
>From 707adafab92900392ed5aabffa678afe9b4903d7 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Wed, 20 Mar 2024 19:36:50 +0800
Subject: [PATCH] [clang][AST][NFC] Add '[[fallthrough]];' to cases fall
through
---
https://github.com/benshi001 approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/86919
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -880,6 +883,24 @@ void StreamChecker::preReadWrite(const FnDescription *Desc,
}
}
+void StreamChecker::preWrite(const FnDescription *Desc, const CallEvent &Call,
benshi001 wrote:
Why we need a separated `preWrite` ? The original `preReadWrite` also work
https://github.com/benshi001 approved this pull request.
After eliminating `std::bind`, I hope there can be further solutions to reduce
duplications.
https://github.com/llvm/llvm-project/pull/84191
___
cfe-commits mailing list
cfe-commits@lists.llvm.o
https://github.com/benshi001 edited
https://github.com/llvm/llvm-project/pull/83858
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3020,44 +3020,82 @@ Check for misuses of stream APIs. Check for misuses of
stream APIs: ``fopen, fcl
alpha.unix.Stream (C)
"
-Check stream handling functions: ``fopen, tmpfile, fclose, fread, fwrite,
fseek, ftell, rewind, fgetpos,``
-``fsetpos, cleare
@@ -3020,44 +3020,82 @@ Check for misuses of stream APIs. Check for misuses of
stream APIs: ``fopen, fcl
alpha.unix.Stream (C)
"
-Check stream handling functions: ``fopen, tmpfile, fclose, fread, fwrite,
fseek, ftell, rewind, fgetpos,``
-``fsetpos, cleare
https://github.com/benshi001 approved this pull request.
https://github.com/llvm/llvm-project/pull/83858
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3020,44 +3020,82 @@ Check for misuses of stream APIs. Check for misuses of
stream APIs: ``fopen, fcl
alpha.unix.Stream (C)
"
-Check stream handling functions: ``fopen, tmpfile, fclose, fread, fwrite,
fseek, ftell, rewind, fgetpos,``
-``fsetpos, cleare
@@ -3020,44 +3020,82 @@ Check for misuses of stream APIs. Check for misuses of
stream APIs: ``fopen, fcl
alpha.unix.Stream (C)
"
-Check stream handling functions: ``fopen, tmpfile, fclose, fread, fwrite,
fseek, ftell, rewind, fgetpos,``
-``fsetpos, cleare
https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/79939
>From 5bbac365c3b587bc72f503c4ce146503f0d0095f Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Tue, 30 Jan 2024 11:45:30 +0800
Subject: [PATCH 1/2] [clang][analyzer] Improve modeling of 'realpath' in
StdLibraryFu
https://github.com/benshi001 closed
https://github.com/llvm/llvm-project/pull/79939
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/78895
>From f2d64a755adc8393d4670d370f6b9a64e368a43b Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Sun, 21 Jan 2024 18:29:06 +0800
Subject: [PATCH 1/2] [clang][analyzer] Improve modeling of 'popen' and
'pclose' in St
@@ -51,6 +51,17 @@ void check_freopen(void) {
if (errno) {} // expected-warning{{An undefined value may be read from
'errno'}}
}
+void check_popen(void) {
+ FILE *F = popen("xxx", "r");
+ if (!F) {
+clang_analyzer_eval(errno != 0); // expected-warning{{TRUE}}
+if
benshi001 wrote:
> Test for these functions can be added to file std-c-library-functions-POSIX.c
> (with check of return value and `errno`).
I will put them into `errno-stdlibraryfunctions.c`, which seems better.
https://github.com/llvm/llvm-project/pull/78930
_
https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/78930
>From 74a43113ee4152eb0cb6aaeb4fbc917bcf0abcf8 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Mon, 22 Jan 2024 12:42:43 +0800
Subject: [PATCH 1/2] [clang[analyzer] Improve modeling of 'execv' and 'execvp'
in Std
https://github.com/benshi001 closed
https://github.com/llvm/llvm-project/pull/78930
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
benshi001 wrote:
This change is a bit complex and I need more time to understand.
https://github.com/llvm/llvm-project/pull/79312
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2211,6 +2221,15 @@ void StdLibraryFunctionsChecker::initFunctionSummaries(
ErrnoNEZeroIrrelevant, GenericFailureMsg)
.ArgConstraint(NotNull(ArgNo(0;
+// int pclose(FILE *stream);
+addToFunctionSummaryMap(
+"pclose", Signatu
https://github.com/benshi001 edited
https://github.com/llvm/llvm-project/pull/78895
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/78895
>From 382ae9d692df575f47c203c9fff2036c42c4833b Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Sun, 21 Jan 2024 18:29:06 +0800
Subject: [PATCH 1/2] [clang][analyzer] Improve modeling of 'popen' and
'pclose' in St
@@ -2211,6 +2221,15 @@ void StdLibraryFunctionsChecker::initFunctionSummaries(
ErrnoNEZeroIrrelevant, GenericFailureMsg)
.ArgConstraint(NotNull(ArgNo(0;
+// int pclose(FILE *stream);
+addToFunctionSummaryMap(
+"pclose", Signatu
benshi001 wrote:
I do not like too long lambda either. In my opinion lambda should be
short/compact.
And I do not think the redundancy is serious, except the common part
```
ProgramStateRef State = C.getState();
SymbolRef StreamSym = getStreamArg(Desc, Call).getAsSymbol();
if (!StreamSym
https://github.com/benshi001 closed
https://github.com/llvm/llvm-project/pull/78895
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
benshi001 wrote:
For the part in the end of most `evalXX` functions,
```
StateFailed = ...
StateNotFailed = ...
```
They are quite similar but not identical, so we can generalize them with helper
functions.
https://github.com/llvm/llvm-project/pull/79312
__
https://github.com/benshi001 created
https://github.com/llvm/llvm-project/pull/79939
None
>From 5bbac365c3b587bc72f503c4ce146503f0d0095f Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Tue, 30 Jan 2024 11:45:30 +0800
Subject: [PATCH] [clang][analyzer] Improve modeling of 'realpath' in
StdLibrary
https://github.com/benshi001 created
https://github.com/llvm/llvm-project/pull/77902
None
>From 97d753446ffc8eb9c701effb52dd671afc73e1dd Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Fri, 12 Jan 2024 18:17:39 +0800
Subject: [PATCH] [clang][analyzer] Improve modeling of 'fseeko' and 'ftello'
in
https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/77902
>From 97d753446ffc8eb9c701effb52dd671afc73e1dd Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Fri, 12 Jan 2024 18:17:39 +0800
Subject: [PATCH 1/2] [clang][analyzer] Improve modeling of 'fseeko' and
'ftello' in S
https://github.com/benshi001 created
https://github.com/llvm/llvm-project/pull/78079
None
>From 2b3d2800be52fb28246c2b51fad7eafc106e3e20 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Sun, 14 Jan 2024 12:44:45 +0800
Subject: [PATCH] Improve modeling of 'opendir' and 'fdopendir' in
StdLibraryFun
https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/78079
>From fd350eea466db33324f07e59469775e81479b33d Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Sun, 14 Jan 2024 12:44:45 +0800
Subject: [PATCH] [clang][analyzer] Improve modeling of two functions in
StdLibraryFun
https://github.com/benshi001 edited
https://github.com/llvm/llvm-project/pull/78079
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
101 - 200 of 353 matches
Mail list logo