[clang] [Clang] Fix a regression introduced by #161163. (PR #162612)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 14 07:45:07 PDT 2025


================
@@ -1165,14 +1164,24 @@ static bool EvaluateUnaryTypeTrait(Sema &Self, TypeTrait UTT,
     const CXXDestructorDecl *Dtor = RD->getDestructor();
     if (UnqualT->isAggregateType() && (!Dtor || !Dtor->isUserProvided()))
       return true;
-    if (RD->hasTrivialDestructor() && (!Dtor || !Dtor->isDeleted())) {
-      for (CXXConstructorDecl *Ctr : RD->ctors()) {
-        if (Ctr->isIneligibleOrNotSelected() || Ctr->isDeleted())
-          continue;
-        if (Ctr->isTrivial())
-          return true;
-      }
+    if (!(RD->hasTrivialDestructor() && (!Dtor || !Dtor->isDeleted())))
----------------
erichkeane wrote:

Would love if you could split this out into a 'give it a name' type situation (ie a variable or something to store this bool?).  This double indirection plus and is a bit of a rough read :) 

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


More information about the cfe-commits mailing list