sethp wrote:
Easy enough: I opened a PR for just those changes as
https://github.com/llvm/llvm-project/pull/74852 . For now, I hope it's OK if I
leave them here too as I continue working on the bit-cast part: I'd still like
to have them locally, and there's a lot of `git rebase -i` involved
tbaederr wrote:
I don't have the capacity to review this properly, but the changes to the
`static_assert` diagnostics should be split out IMO.
https://github.com/llvm/llvm-project/pull/74775
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -49,19 +48,33 @@
#include "clang/AST/OptionalDiagnostic.h"
#include "clang/AST/RecordLayout.h"
#include "clang/AST/StmtVisitor.h"
+#include "clang/AST/Type.h"
#include "clang/AST/TypeLoc.h"
#include "clang/Basic/Builtins.h"
-#include "clang/Basic/DiagnosticSema.h"
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: None (sethp)
Changes
After this commit, clang permits constructions like:
```c++
struct bits {
unsigned char : 7;
unsigned char flag : 1;
}
static_assert(std::bit_castbits(0x80).flag); // succeeds on
little-endian systems
```
A
https://github.com/sethp created https://github.com/llvm/llvm-project/pull/74775
After this commit, clang permits constructions like:
```c++
struct bits {
unsigned char : 7;
unsigned char flag : 1;
}
static_assert(std::bit_cast(0x80).flag); // succeeds on little-endian
systems
```
A