@@ -651,8 +651,19 @@ void AVR::Linker::ConstructJob(Compilation &C, const
JobAction &JA,
// This is almost always required because otherwise avr-ld
// will assume 'avr2' and warn about the program being larger
// than the bare minimum supports.
- if (Linker.find("avr-ld
benshi001 wrote:
> > I do not think this PR is necessary, since there is no bug, I have
> > explained in #146537.
>
> You are right, so this PR is not a bug fix, but just adding features and a
> minor optimization.
Currently I am focusing on bugfix and compatibility/substitutability with
avr
benshi001 wrote:
> > I do not think this PR is necessary, since there is no bug, I have
> > explained in #146537.
>
> You are right, so this PR is not a bug fix, but just adding features and a
> minor optimization.
Currently I am focusing on bugfix and compatibility/substitutability with
avr
benshi001 wrote:
> > I do not think this PR is necessary, since there is no bug, I have
> > explained in #146537.
>
> You are right, so this PR is not a bug fix, but just adding features and a
> minor optimization.
Currently I am focusing on bugfix and compatibility/substitutability with
avr
benshi001 wrote:
> > I do not think this PR is necessary, since there is no bug, I have
> > explained in #146537.
>
> You are right, so this PR is not a bug fix, but just adding features and a
> minor optimization.
Currently I am focusing on bugfix and compatibility with avr-gcc-7.3 (which is
benshi001 wrote:
I do not think this PR is necessary, since there is no bug, I have explained in
https://github.com/llvm/llvm-project/issues/146537.
https://github.com/llvm/llvm-project/pull/146244
___
cfe-commits mailing list
cfe-commits@lists.llvm.o
https://github.com/benshi001 requested changes to this pull request.
unit tests are needed.
https://github.com/llvm/llvm-project/pull/146244
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com
benshi001 wrote:
> @benshi001 @Patryk27 Could you review this?
As I have told you several days ago, each functional change requires unit
tests, your PR involves
1. clang driver
2. clang builtin macro
3. avr backend codegen
Each part needs unit tests to show what are affected.
https://github
benshi001 wrote:
Maybe we should ask owner of clang driver @MaskRay if a new option can be
accepted.
https://github.com/llvm/llvm-project/pull/146244
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listin
https://github.com/benshi001 closed
https://github.com/llvm/llvm-project/pull/134254
___
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/144229
___
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/144229
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
benshi001 wrote:
> For future reference, the avr16/avr32 devices do have SPM and SPMX features,
> but the current xmega3 definition has not.
>
> Xmega3 is also used for modern attiny series which do not have SPM(X), so
> that is correct.
>
> The avr64 devices use xmega2 which has SPM(X) defin
benshi001 wrote:
> @tomtor @benshi001 I just tried your latest revision on the top of tree, and
> both `check-llvm` and `check-clang` passed.
Thanks for your help !
https://github.com/llvm/llvm-project/pull/144229
___
cfe-commits mailing list
cfe-com
benshi001 wrote:
> manage to run these tests locally yet, but will figure that out.
This flang failure did not relate to your AVR patch, just omit it.
https://github.com/llvm/llvm-project/pull/144229
___
cfe-commits mailing list
cfe-commits@lists.llvm
https://github.com/benshi001 closed
https://github.com/llvm/llvm-project/pull/143914
___
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/143914
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -326,8 +326,78 @@ constexpr struct {
{"attiny1624", "avrxmega3", "avrxmega3", 0x803800},
{"attiny1626", "avrxmega3", "avrxmega3", 0x803800},
{"attiny1627", "avrxmega3", "avrxmega3", 0x803800},
+{"attiny3224", "avrxmega3", "avrxmega3", 0x803400},
+{"attiny
https://github.com/benshi001 edited
https://github.com/llvm/llvm-project/pull/143914
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/benshi001 requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/143914
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -326,8 +326,78 @@ constexpr struct {
{"attiny1624", "avrxmega3", "avrxmega3", 0x803800},
{"attiny1626", "avrxmega3", "avrxmega3", 0x803800},
{"attiny1627", "avrxmega3", "avrxmega3", 0x803800},
+{"attiny3224", "avrxmega3", "avrxmega3", 0x803400},
+{"attiny
@@ -326,8 +326,78 @@ constexpr struct {
{"attiny1624", "avrxmega3", "avrxmega3", 0x803800},
{"attiny1626", "avrxmega3", "avrxmega3", 0x803800},
{"attiny1627", "avrxmega3", "avrxmega3", 0x803800},
+{"attiny3224", "avrxmega3", "avrxmega3", 0x803400},
+{"attiny
@@ -336,6 +336,9 @@ static MCUInfo AVRMcus[] = {
{"attiny1624", "__AVR_ATtiny1624__", "103", 1},
{"attiny1626", "__AVR_ATtiny1626__", "103", 1},
{"attiny1627", "__AVR_ATtiny1627__", "103", 1},
+{"attiny3224", "__AVR_ATtiny1624__", "103", 1},
ben
https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/136534
>From 1dcd2d91c37a4e6afc137ff0ad54d25777a1f4b1 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Mon, 21 Apr 2025 11:16:51 +0800
Subject: [PATCH 1/3] [clang][AVR] Improve compitability of inline assembly
with avr-
benshi001 wrote:
> > > gcc doesn't seem to allow it? https://godbolt.org/z/4zh8TTPac
> >
> >
> > avr-gcc allow value 64 for constraint 'I' in very special case, such as
> > #51513.
>
> I guess the test needs to be updated to be representative?
>
> > And my solution is loosen that check in th
https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/136534
>From 1dcd2d91c37a4e6afc137ff0ad54d25777a1f4b1 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Mon, 21 Apr 2025 11:16:51 +0800
Subject: [PATCH 1/2] [clang][AVR] Improve compitability of inline assembly
with avr-
benshi001 wrote:
> gcc doesn't seem to allow it? https://godbolt.org/z/4zh8TTPac
avr-gcc allow value 64 for constraint 'I' in very special case, such as
https://github.com/avrdudes/avr-libc/issues/678.
And my solution is loosen that check in the frontend, but let the AVR backend
to deny the i
https://github.com/benshi001 created
https://github.com/llvm/llvm-project/pull/136534
Allow the value 64 to be round up to 0 for constraint 'I'.
>From 1dcd2d91c37a4e6afc137ff0ad54d25777a1f4b1 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Mon, 21 Apr 2025 11:16:51 +0800
Subject: [PATCH] [clang][
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
1 - 100 of 376 matches
Mail list logo