================
@@ -2285,6 +2286,68 @@ static void DiagnoseNonTriviallyCopyableReason(Sema
&SemaRef,
SemaRef.Diag(D->getLocation(), diag::note_defined_here) << D;
}
+static void DiagnoseIsEmptyReason(Sema &S, SourceLocation Loc,
+ const CXXRecordDecl *D) {
+ // Non-static data members (ignore zero-width bitāfields).
+ for (auto *Field : D->fields()) {
+ if (Field->isBitField() && Field->getBitWidthValue() == 0)
----------------
AaronBallman wrote:
We should probably ensure we have tests for dependent values/types, along the
lines of:
```
template <int N>
struct S {
int field : N;
};
S<0> s1; // Empty
S<1> s2; // Non-empty
```
https://github.com/llvm/llvm-project/pull/145044
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits