================ @@ -1718,7 +1718,7 @@ void InitListChecker::CheckComplexType(const InitializedEntity &Entity, // the element type of the complex type. The first element initializes // the real part, and the second element intitializes the imaginary part. - if (IList->getNumInits() < 2) + if (IList->getNumInitsWithEmbedExpanded() < 2) ---------------- efriedma-quic wrote:
We could have "hasZeroInits()" and "hasOneInit()" methods, which wouldn't require iterating over the whole init list. (An initializer has zero inits if it has zero subexpressions. An initializer has one init if it has one sub-expression, and that subexpression isn't an EmbedExpr with more than one element.) https://github.com/llvm/llvm-project/pull/231938 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
