================ @@ -2253,6 +2260,60 @@ static void DiagnoseNonTriviallyCopyableReason(Sema &SemaRef, } } +static void DiagnoseNonConstructibleReason( + Sema &SemaRef, SourceLocation Loc, + const llvm::SmallVector<clang::QualType, 1> &Ts) { + bool CompleteTypes = true; + for (const auto &ArgTy : Ts) { + if (ArgTy->isVoidType() || ArgTy->isIncompleteArrayType()) + continue; + if (ArgTy->isIncompleteType()) { + SemaRef.Diag(Loc, diag::err_incomplete_type_used_in_type_trait_expr) + << ArgTy; + CompleteTypes = false; + } + } + if (!CompleteTypes) + return; ---------------- cor3ntin wrote:
Incomplete types should have been diagnosed already, so the check for incomplete type is not useful (we do need checks for void and incomplete array types) https://godbolt.org/z/hc5jrjz51 https://github.com/llvm/llvm-project/pull/143309 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits