benshi001 wrote:
Is this change necessary? I find there is not change in the size of addrspace
0/1 pointers, before and after your patch.
for program
```c++
clang a.c --target=avr -mmcu=atmega2560
int gf(int a);
int (*p)(int) = gf;
int f;
int *p1 = &f;
```
the generated assembly is unique by
https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/131976
>From 163c73d21af736c94f1bb8f8c63caf96e127aba5 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Wed, 19 Mar 2025 13:21:48 +0800
Subject: [PATCH 1/3] [clang][CodeGen][AVR] Fix a crash in AVRABIInfo
fixes https://g
benshi001 wrote:
> CC @benshi001
>
> To be 100% honest I haven't tested this on AVR silicon yet. My motivation for
> the change is to allow for non-zero data address spaces in Rust which parses
> these LLVM data format specs, but would then use both 64-bit and 16-bit
> pointers for AVR. Apolo
https://github.com/benshi001 closed
https://github.com/llvm/llvm-project/pull/131976
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -114,3 +114,13 @@ struct s15 fooa(char a, char b) {
x.arr[1] = b;
return x;
}
+
+struct s8_t {
+ char a;
+};
+
+// AVR: define {{.*}} i8 @foob(i8 {{.*}})
+// TINY define {{.*}} i8 @foob(i8 {{.*}})
benshi001 wrote:
fixed. thanks!
https://github.com/l
https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/131976
>From 163c73d21af736c94f1bb8f8c63caf96e127aba5 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Wed, 19 Mar 2025 13:21:48 +0800
Subject: [PATCH 1/2] [clang][CodeGen][AVR] Fix a crash in AVRABIInfo
fixes https://g
https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/131976
>From 163c73d21af736c94f1bb8f8c63caf96e127aba5 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Wed, 19 Mar 2025 13:21:48 +0800
Subject: [PATCH 1/2] [clang][CodeGen][AVR] Fix a crash in AVRABIInfo
fixes https://g
https://github.com/benshi001 created
https://github.com/llvm/llvm-project/pull/131976
fixes https://github.com/llvm/llvm-project/issues/131967
>From 163c73d21af736c94f1bb8f8c63caf96e127aba5 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Wed, 19 Mar 2025 13:21:48 +0800
Subject: [PATCH] [clang][Co
https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/130456
>From 065275c3bb8d3935d66f2b4cf7a2766bccd1 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Thu, 20 Feb 2025 18:01:42 +0800
Subject: [PATCH] [clang][analyzer][NFC] Fix typos in comments
---
.../Core/PathSens
https://github.com/benshi001 created
https://github.com/llvm/llvm-project/pull/130456
None
>From 256a8383066dcc20f87296bc0ec659a9b5764a64 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Thu, 20 Feb 2025 18:01:42 +0800
Subject: [PATCH] [clang][analyzer][NFC] Fix typos in comments
---
.../Core/Pa
https://github.com/benshi001 closed
https://github.com/llvm/llvm-project/pull/126676
___
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/125997
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -351,8 +351,8 @@ def warn_arm_interrupt_vfp_clobber : Warning<
def err_arm_interrupt_called : Error<
"interrupt service routine cannot be called directly">;
def warn_interrupt_attribute_invalid : Warning<
benshi001 wrote:
fixed.
https://github.com/llvm/l
@@ -351,8 +351,8 @@ def warn_arm_interrupt_vfp_clobber : Warning<
def err_arm_interrupt_called : Error<
"interrupt service routine cannot be called directly">;
def warn_interrupt_attribute_invalid : Warning<
- "%select{MIPS|MSP430|RISC-V}0 'interrupt' attribute only applies
https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/125997
>From 2c02723208bd48e82621e3bee5b778f6c8bcd2e5 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Mon, 27 Jan 2025 13:04:45 +0800
Subject: [PATCH 1/2] [clang][Sema] Emit warnings about incorrect AVR
interrupt/signa
https://github.com/benshi001 closed
https://github.com/llvm/llvm-project/pull/125328
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
benshi001 wrote:
Since the code is not updated automatically, I created a new PR for my code
change.
https://github.com/llvm/llvm-project/pull/125328
https://github.com/llvm/llvm-project/pull/125328
___
cfe-commits mailing list
cfe-commits@lists.llvm
https://github.com/benshi001 created
https://github.com/llvm/llvm-project/pull/125997
1. interrupt/signal handlers can not have parameters
2. interrupt/signal handlers must be 'void' type
>From 2c02723208bd48e82621e3bee5b778f6c8bcd2e5 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Mon, 27 Jan 20
benshi001 wrote:
it is strange: I have added the case avkevl mentioned in my
[repo](https://github.com/benshi001/llvm-project/commit/8ce75fc80b8bbfb79009e53c0d7ac8015983e4da),
but this PR is not updated.
https://github.com/llvm/llvm-project/pull/125328
_
benshi001 wrote:
this case is added.
https://github.com/llvm/llvm-project/pull/125328
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
benshi001 wrote:
> Does the "other then" pattern appear anywhere else? Same for paremeters?
>
> (At lesdt withing static analyzer code?)
I did not find them in other places.
https://github.com/llvm/llvm-project/pull/125622
___
cfe-commits mailing lis
https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/125622
>From c4e7f13e392a1f36f3c5774927954a2fab3d5ccd Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Tue, 4 Feb 2025 11:28:42 +0800
Subject: [PATCH] [clang][StaticAnalyzer] Fix typos in comments [NFC]
---
.../clang/S
https://github.com/benshi001 created
https://github.com/llvm/llvm-project/pull/125622
None
>From bbd633f6fcd68a14c64281161ba41fda3f4eb047 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Tue, 4 Feb 2025 11:28:42 +0800
Subject: [PATCH] [clang][StaticAnalyzer] Fix a typo in comments [NFC]
---
.../
https://github.com/benshi001 created
https://github.com/llvm/llvm-project/pull/125339
None
>From 1cfa014550c0a1c2a8bb22587afdc8b211481f95 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Sat, 1 Feb 2025 16:16:29 +0800
Subject: [PATCH] [clang][StaticAnalyzer][NFC] Fix a typo in comments
---
.../c
benshi001 wrote:
AVR interrupt/signal handlers must be `void` and has no argument.
https://github.com/llvm/llvm-project/pull/125328
___
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/125328
>From e9669133f46c409c4a5ee5cdd00cab2dc941a254 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Mon, 27 Jan 2025 13:04:45 +0800
Subject: [PATCH] [clang][Sema] Emit warnings about incorrect AVR
interrupt/signal ha
https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/125328
>From 5ff3c98370a583d5619ba2a6ac5a605f87de7361 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Mon, 27 Jan 2025 13:04:45 +0800
Subject: [PATCH] [clang][Sema] Warning about incorrect AVR interrupt/signal
handlers
https://github.com/benshi001 created
https://github.com/llvm/llvm-project/pull/125328
None
>From 6f2fc35842a4a3647600da99342209bda4eb72f9 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Mon, 27 Jan 2025 13:04:45 +0800
Subject: [PATCH] [clang][Sema] Warning about incorrect AVR interrupt/signal
ha
https://github.com/benshi001 closed
https://github.com/llvm/llvm-project/pull/114394
___
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/114394
>From eb74d413d2f5e5dcc520282a5c59893d5bf5 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Thu, 31 Oct 2024 20:06:55 +0800
Subject: [PATCH] [clang][driver] Improve warning message for AVR when no
'-mmcu' opt
https://github.com/benshi001 created
https://github.com/llvm/llvm-project/pull/114394
Fixes https://github.com/llvm/llvm-project/issues/96743
>From 78f1d4654674f671834e2ebe44877d632da8ee8b Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Thu, 31 Oct 2024 20:06:55 +0800
Subject: [PATCH] [clang][dri
https://github.com/benshi001 approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/111290
___
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/111798
___
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/111798
>From 45b72f225a663c96652955347f9e2c2fb5044335 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Thu, 10 Oct 2024 15:31:19 +0800
Subject: [PATCH 1/2] [clang][Driver][AVR] Reject c/c++ compilation for avr1
devices
benshi001 wrote:
> Please add a release note in
> https://clang.llvm.org/docs/ReleaseNotes.html#avr-support
> (`clang/docs/ReleaseNotes.rst`).
>
> Otherwise, this looks good to me.
The note is added. Thanks!
https://github.com/llvm/llvm-project/pull/111798
___
https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/111798
>From 45b72f225a663c96652955347f9e2c2fb5044335 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Thu, 10 Oct 2024 15:31:19 +0800
Subject: [PATCH] [clang][Driver][AVR] Reject c/c++ compilation for avr1
devices
avr
benshi001 wrote:
> ```
> �_bk;t=1728546187607�Failed Tests (1):
> �_bk;t=1728546187607� Clang :: Driver/hip-partial-link.hip
> ```
>
> And the CI test failure is this, the reporting is not great because we run
> check- targets one after another. This test was already failing on main.
>
> If i
@@ -400,6 +400,14 @@ void AVRToolChain::AddClangSystemIncludeArgs(const ArgList
&DriverArgs,
void AVRToolChain::addClangTargetOptions(
const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args,
Action::OffloadKind DeviceOffloadKind) const {
+ // Reject C
@@ -400,6 +400,14 @@ void AVRToolChain::AddClangSystemIncludeArgs(const ArgList
&DriverArgs,
void AVRToolChain::addClangTargetOptions(
const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args,
Action::OffloadKind DeviceOffloadKind) const {
+ // Reject C
@@ -400,6 +400,14 @@ void AVRToolChain::AddClangSystemIncludeArgs(const ArgList
&DriverArgs,
void AVRToolChain::addClangTargetOptions(
const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args,
Action::OffloadKind DeviceOffloadKind) const {
+ // Reject C
@@ -400,6 +400,14 @@ void AVRToolChain::AddClangSystemIncludeArgs(const ArgList
&DriverArgs,
void AVRToolChain::addClangTargetOptions(
const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args,
Action::OffloadKind DeviceOffloadKind) const {
+ // Reject C
benshi001 wrote:
> Thanks for getting to this I had forgotten I raised that issue.
>
> You should move your commit's message into the PR description, as the PR
> description is what's used for the final commit when we merge this.
Thanks. I have update my PR description according to my commit m
https://github.com/benshi001 edited
https://github.com/llvm/llvm-project/pull/111798
___
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/111798
>From c50c44044546fd9d67dab56b1f88b2e83557656f Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Thu, 10 Oct 2024 15:31:19 +0800
Subject: [PATCH] [clang][Driver][AVR] Reject c/c++ compilation for avr1
devices
avr
https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/111798
>From 259282836aa24e59b94dba0572faa2180520028d Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Thu, 10 Oct 2024 15:31:19 +0800
Subject: [PATCH] [Driver][AVR] Reject c/c++ compilation for avr1 devices
avr-gcc als
https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/111798
>From 437fbfb157882469ffa576a023f39399fc82f69c Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Thu, 10 Oct 2024 15:31:19 +0800
Subject: [PATCH] [Driver][AVR] Reject c/c++ compilation for avr1 devices
avr-gcc als
https://github.com/benshi001 created
https://github.com/llvm/llvm-project/pull/111798
avr-gcc also rejects since these devices has no SRAM.
>From 438b4ed8556445d1950d7878660d893350fa27a6 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Thu, 10 Oct 2024 15:31:19 +0800
Subject: [PATCH] [Driver][AVR]
=?utf-8?q?Bal=C3=A1zs_K=C3=A9ri?=
Message-ID:
In-Reply-To:
https://github.com/benshi001 approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/102580
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/
https://github.com/benshi001 closed
https://github.com/llvm/llvm-project/pull/85921
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
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
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 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 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
@@ -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
@@ -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 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
=?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
https://github.com/benshi001 approved this pull request.
https://github.com/llvm/llvm-project/pull/82228
___
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/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/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 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
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 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:
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
@@ -2211,6 +2221,15 @@ void StdLibraryFunctionsChecker::initFunctionSummaries(
ErrnoNEZeroIrrelevant, GenericFailureMsg)
.ArgConstraint(NotNull(ArgNo(0;
+// int pclose(FILE *stream);
+addToFunctionSummaryMap(
+"pclose", Signatu
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
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
@@ -2211,6 +2221,15 @@ void StdLibraryFunctionsChecker::initFunctionSummaries(
ErrnoNEZeroIrrelevant, GenericFailureMsg)
.ArgConstraint(NotNull(ArgNo(0;
+// int pclose(FILE *stream);
+addToFunctionSummaryMap(
+"pclose", Signatu
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
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
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
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
_
@@ -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
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
https://github.com/benshi001 created
https://github.com/llvm/llvm-project/pull/78930
These functions always return -1 and set 'errno'.
>From 74a43113ee4152eb0cb6aaeb4fbc917bcf0abcf8 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Mon, 22 Jan 2024 12:42:43 +0800
Subject: [PATCH] [clang[analyzer] I
https://github.com/benshi001 closed
https://github.com/llvm/llvm-project/pull/78886
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/benshi001 edited
https://github.com/llvm/llvm-project/pull/78886
___
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] [clang][analyzer] Improve modeling of 'popen' and 'pclose' in
StdLib
https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/78886
>From c3f97bd20af18c7bef98408b11d9e92cea614dc6 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Sun, 21 Jan 2024 15:20:24 +0800
Subject: [PATCH] [clang][analyzer][NFC] Simplify ranges in
StdLibraryFunctionsChecker
https://github.com/benshi001 edited
https://github.com/llvm/llvm-project/pull/78886
___
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/78886
>From 8c58bd507c12cd119f1a06d8763e6c4d3c5ad1bc Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Sun, 21 Jan 2024 15:20:24 +0800
Subject: [PATCH] [clang][analyzer][NFC] Simplify EOF involved ranges in
StdLibraryFun
https://github.com/benshi001 created
https://github.com/llvm/llvm-project/pull/78895
None
>From b093d705ee949227ec0f7fe23bb65d43c7f9e51f Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Sun, 21 Jan 2024 18:29:06 +0800
Subject: [PATCH] [clang][analyzer] Improve modeling of 'popen' and 'pclose' in
https://github.com/benshi001 created
https://github.com/llvm/llvm-project/pull/78886
None
>From 7d0c3f5ce7f6a8d753bf6d5a2020baefeef35703 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Sun, 21 Jan 2024 15:20:24 +0800
Subject: [PATCH] [clang][analyzer][NFC] Simplify argument range in
StdLibraryFu
benshi001 wrote:
> I have already a working code to simplify code repetitions, but want to merge
> first patches #76979 and #78180 (@NagyDonat could you look at these too?).
How about merge this patch first, then apply your simplification one? Since my
current one also is affected.
https://gi
=?utf-8?q?Bal=C3=A1zs_K=C3=A9ri?= ,
=?utf-8?q?Bal=C3=A1zs_K=C3=A9ri?= ,
=?utf-8?q?Bal=C3=A1zs_K=C3=A9ri?=
Message-ID:
In-Reply-To:
@@ -2201,6 +2214,56 @@ void StdLibraryFunctionsChecker::initFunctionSummaries(
ErrnoNEZeroIrrelevant, GenericFailureMsg)
=?utf-8?q?Balázs_Kéri?= ,
=?utf-8?q?Balázs_Kéri?= ,
=?utf-8?q?Balázs_Kéri?=
Message-ID:
In-Reply-To:
@@ -2201,6 +2214,56 @@ void StdLibraryFunctionsChecker::initFunctionSummaries(
ErrnoNEZeroIrrelevant, GenericFailureMsg)
.ArgConstraint(NotNull(A
=?utf-8?q?Bal=C3=A1zs_K=C3=A9ri?= ,
=?utf-8?q?Bal=C3=A1zs_K=C3=A9ri?= ,
=?utf-8?q?Bal=C3=A1zs_K=C3=A9ri?=
Message-ID:
In-Reply-To:
@@ -2201,6 +2214,56 @@ void StdLibraryFunctionsChecker::initFunctionSummaries(
ErrnoNEZeroIrrelevant, GenericFailureMsg)
=?utf-8?q?Balázs_Kéri?= ,
=?utf-8?q?Balázs_Kéri?= ,
=?utf-8?q?Balázs_Kéri?=
Message-ID:
In-Reply-To:
@@ -2201,6 +2214,56 @@ void StdLibraryFunctionsChecker::initFunctionSummaries(
ErrnoNEZeroIrrelevant, GenericFailureMsg)
.ArgConstraint(NotNull(A
=?utf-8?q?Balázs_Kéri?= ,
=?utf-8?q?Balázs_Kéri?= ,
=?utf-8?q?Balázs_Kéri?=
Message-ID:
In-Reply-To:
@@ -2201,6 +2214,56 @@ void StdLibraryFunctionsChecker::initFunctionSummaries(
ErrnoNEZeroIrrelevant, GenericFailureMsg)
.ArgConstraint(NotNull(A
=?utf-8?q?Balázs_Kéri?= ,
=?utf-8?q?Balázs_Kéri?= ,
=?utf-8?q?Balázs_Kéri?=
Message-ID:
In-Reply-To:
https://github.com/benshi001 edited
https://github.com/llvm/llvm-project/pull/76979
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://l
=?utf-8?q?Balázs_Kéri?= ,
=?utf-8?q?Balázs_Kéri?= ,
=?utf-8?q?Balázs_Kéri?=
Message-ID:
In-Reply-To:
@@ -2201,6 +2214,56 @@ void StdLibraryFunctionsChecker::initFunctionSummaries(
ErrnoNEZeroIrrelevant, GenericFailureMsg)
.ArgConstraint(NotNull(A
=?utf-8?q?Bal=C3=A1zs_K=C3=A9ri?= ,
=?utf-8?q?Bal=C3=A1zs_K=C3=A9ri?= ,
=?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/76979
___
cfe-commi
https://github.com/benshi001 closed
https://github.com/llvm/llvm-project/pull/78680
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
1 - 100 of 348 matches
Mail list logo