[clang] [clang] fix crash when evaluating __is_bitwise_cloneable on an invalid type (PR #183707)

Xinlong Chen via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 1 09:08:43 PST 2026


================
@@ -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;
----------------
Xinlong-Chen wrote:

incomplete case have been added

https://github.com/llvm/llvm-project/pull/183707


More information about the cfe-commits mailing list