================
@@ -2940,18 +2940,28 @@ bool QualType::isBitwiseCloneableType(const ASTContext
&Context) const {
if (RD->mayInsertExtraPadding())
return false;
+ auto isCycleBackToRD = [RD](QualType T) {
+ return !T.isNull() && !T->containsErrors() &&
+ T.getCanonicalType()->getAsRecordDecl() == RD;
----------------
cor3ntin wrote:
I think testing for incomplete or invalid types should be enough.
Did you test something like that
```cpp
struct Bar;
struct Foo {
Bar bar;
};
static_assert(__is_bitwise_cloneable(Bar)
```
https://github.com/llvm/llvm-project/pull/183707
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits