[clang] [Sema] add cast from IncompleteArrayType to ConstantArrayType in TryReferenceListInitialization (PR #65918)

Mariya Podchishchaeva via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 13 03:31:58 PDT 2023


================
@@ -4532,6 +4532,15 @@ static void TryReferenceListInitialization(Sema &S,
       if (T1Quals.hasAddressSpace())
         Sequence.AddQualificationConversionStep(
             cv1T1, DestType->isRValueReferenceType() ? VK_XValue : VK_LValue);
+      else if (S.getLangOpts().CPlusPlus20 &&
+               isa<IncompleteArrayType>(T1->getUnqualifiedDesugaredType()) &&
+               DestType->isRValueReferenceType()) {
+        // [dcl.init.list] p3.10
----------------
Fznamznon wrote:

NIT
```suggestion
        // C++20 [dcl.init.list]p3.10:
```

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


More information about the cfe-commits mailing list