[clang] [Clang] Fix handling of brace ellison when building deduction guides (PR #94889)

via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 13 01:18:14 PDT 2024


================
@@ -1449,7 +1449,21 @@ void InitListChecker::CheckSubElementType(const InitializedEntity &Entity,
       //   dependent non-array type or an array type with a value-dependent
       //   bound
       assert(AggrDeductionCandidateParamTypes);
-      if (!isa_and_nonnull<ConstantArrayType>(
+
+      // In the presence of a braced-init-list within the initializer, we should
+      // not fall through to the brace-elision logic, even if the brace elision
+      // is applicable. Given the example,
----------------
cor3ntin wrote:

```suggestion
      // In the presence of a braced-init-list within the initializer, we should
      // not perform brace-elision, even if brace elision would otherwise be applicable. For example, given:
```

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


More information about the cfe-commits mailing list