[clang] [clang] Implement `__builtin_is_implicit_lifetime()` (PR #101807)

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 13 03:44:45 PDT 2024


================
@@ -5637,6 +5638,27 @@ static bool EvaluateUnaryTypeTrait(Sema &Self, TypeTrait UTT,
     return false;
   case UTT_IsTriviallyEqualityComparable:
     return isTriviallyEqualityComparableType(Self, T, KeyLoc);
+  case UTT_IsImplicitLifetime: {
+    DiagnoseVLAInCXXTypeTrait(Self, TInfo,
+                              tok::kw___builtin_is_implicit_lifetime);
+    QualType UnqualT = T->getCanonicalTypeUnqualified();
+    if (UnqualT->isScalarType())
----------------
Endilll wrote:

> Honestly, I have no idea. Given that we recently came to agreement that other stakeholders should have a say about our extensions, I wonder what libc++ thinks of this. CC @AaronBallman @ldionne @philnik777

Me, @AaronBallman, and @philnik777 discussed that yesterday during Aaron's office hours. As I understood it, there are no concerns from libc++ side here.

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


More information about the cfe-commits mailing list