[clang] [Clang] Added explanation why a is constructible evaluated to false. (PR #143309)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 12 08:57:01 PDT 2025
================
@@ -2253,6 +2260,53 @@ static void DiagnoseNonTriviallyCopyableReason(Sema &SemaRef,
}
}
+static void DiagnoseNonConstructibleReason(
+ Sema &SemaRef, SourceLocation Loc,
+ const llvm::SmallVector<clang::QualType, 1> &Ts) {
+ for (const auto &ArgTy : Ts) {
+ if (ArgTy->isVoidType())
+ SemaRef.Diag(Loc, diag::note_unsatisfied_trait_reason)
+ << diag::TraitNotSatisfiedReason::CVVoidType;
+ }
+
+ QualType T = Ts[0];
----------------
erichkeane wrote:
Do we know that `Ts` is >=1? in size? Maybe early-exit if `Ts.empty`?
https://github.com/llvm/llvm-project/pull/143309
More information about the cfe-commits
mailing list