================
@@ -1167,16 +1167,22 @@ static bool EvaluateUnaryTypeTrait(Sema &Self,
TypeTrait UTT,
return true;
if (!(RD->hasTrivialDestructor() && (!Dtor || !Dtor->isDeleted())))
return false;
+ if (RD->hasTrivialDefaultConstructor())
+ return true;
bool FoundCopyCtr = false;
bool FoundMoveCtr = false;
+ bool FoundDefaultCtr = false;
for (CXXConstructorDecl *Ctr : RD->ctors()) {
- FoundCopyCtr = Ctr->isCopyConstructor();
- FoundMoveCtr = Ctr->isMoveConstructor();
if (Ctr->isIneligibleOrNotSelected() || Ctr->isDeleted())
continue;
----------------
bolshakov-a wrote:
The test fails now because short-circuiting here occurs before `FoundCopyCtr`
can be set.
https://github.com/llvm/llvm-project/pull/162612
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits