[all-commits] [llvm/llvm-project] 574e95: [clang] Implement CWG2627 Bit-fields and narrowing...
Mital Ashok via All-commits
all-commits at lists.llvm.org
Fri Aug 9 05:46:49 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 574e9584494cd408fb3595df9b9d52bb3e03921a
https://github.com/llvm/llvm-project/commit/574e9584494cd408fb3595df9b9d52bb3e03921a
Author: Mital Ashok <mital at mitalashok.co.uk>
Date: 2024-08-09 (Fri, 09 Aug 2024)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/lib/Sema/SemaOverload.cpp
M clang/test/CXX/drs/cwg26xx.cpp
M clang/test/Sema/constexpr.c
A clang/test/SemaCXX/bitint-narrowing.cpp
M clang/www/cxx_dr_status.html
Log Message:
-----------
[clang] Implement CWG2627 Bit-fields and narrowing conversions (#78112)
https://cplusplus.github.io/CWG/issues/2627.html
It is no longer a narrowing conversion when converting a bit-field to a
type smaller than the field's declared type if the bit-field has a width
small enough to fit in the target type. This includes integral
promotions (`long long i : 8` promoted to `int` is no longer narrowing,
allowing `c.i <=> c.i`) and list-initialization (`int n{ c.i };`)
Also applies back to C++11 as this is a defect report.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list