[clang] [clang] Fixed auto type inference failing when the rhs is a bit-field expression (PR #226784)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Sep 27 06:26:06 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Abdulmalek Almkainzi (aalmkainzi)
<details>
<summary>Changes</summary>
e.g.
```C
void f()
{
struct S { unsigned i : 2; };
struct S s = {};
auto x = s.i; // previously failed. now accepted and x is an `unsigned int`
}
```
Fixes #<!-- -->226280
---
Full diff: https://github.com/llvm/llvm-project/pull/226784.diff
2 Files Affected:
- (modified) clang/lib/Sema/SemaTemplateDeduction.cpp (+2-1)
- (added) clang/test/Sema/c23-auto-bitfield.c (+10)
``````````diff
The server is unavailable at this time. Please wait a few minutes before you try again.
``````````
</details>
https://github.com/llvm/llvm-project/pull/226784
More information about the cfe-commits
mailing list