kr-2003 wrote:
> Hmmm confused !
>
> So does it really come down to the flag responsible for enabling assertions.
> `LLVM_ENABLE_ASSERTIONS=ON`
Seems like it. This is the only flag that explains this behaviour.
https://github.com/llvm/llvm-project/pull/127087
__
kr-2003 wrote:
> My theory with limited testing: The crash is caused by assertion failure at
> https://github.com/llvm/llvm-project/blob/eb7c947272952d40d3235d89652a10da52cb2b4d/clang/lib/AST/DeclBase.cpp#L1757C1-L1758C54.
> So if we disable assertions it does not crash, and crashes otherwise.
kr-2003 wrote:
> There are quite some observations made by @kr-2003 and me here.
>
> 1. We realize even without this fix, stuff worked perfectly on our Macos ARM
> devices. So looks like a Ubuntu issue anyways
>
> : Add a check
before calling ```isPrimitiveUninit```
```cpp
if (isPrimitiveType(T)) {
if (I->isUnnamedBitField()) {
continue;
https://github.com/kr-2003 edited
https://github.com/llvm/llvm-project/pull/132427
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
kr-2003 wrote:
> Could you add a test case that fails before your patch?
Sure, here it is
## Testcase
```cpp
struct S
{
S(bool b)
: b(b)
{}
bool b{false};
long long : 7; // padding
};
void f()
{
S s(true);
}
```
### Before Patch
https://github.com/user-attachments/asset
https://github.com/kr-2003 edited
https://github.com/llvm/llvm-project/pull/132427
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kr-2003 edited
https://github.com/llvm/llvm-project/pull/132427
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kr-2003 updated
https://github.com/llvm/llvm-project/pull/132427
>From 72aafcc255bbcfccb3fa5317e260faf97a3dfed5 Mon Sep 17 00:00:00 2001
From: kr-2003
Date: Fri, 21 Mar 2025 20:45:11 +0530
Subject: [PATCH 1/4] [clang][analyzer] Removed warnings for unnamed bitfields
---
...
kr-2003 wrote:
> > My proposal is to judge the current `FieldDecl` at the beginning of the
> > loop, and if it's a UnamedBitField, just skip it, because at that point the
> > UnamedBitField's static check should be passing. If it's a NamedBitField
> > then it needs to be initialized to pass th
kr-2003 wrote:
Hey, @vgvassilev
Curious to know the status of this. Thank you.
https://github.com/llvm/llvm-project/pull/84769
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
13 matches
Mail list logo