================ @@ -1596,12 +1596,14 @@ QualType Sema::BuildQualifiedType(QualType T, SourceLocation Loc, QualType ProblemTy; if (T->isAnyPointerType() || T->isReferenceType() || - T->isMemberPointerType()) { + T->isMemberPointerType() || T->isArrayType()) { QualType EltTy; if (T->isObjCObjectPointerType()) EltTy = T; else if (const MemberPointerType *PTy = T->getAs<MemberPointerType>()) EltTy = PTy->getPointeeType(); + else if (T->isArrayType()) + EltTy = BuildQualifiedType(Context.getBaseElementType(T), Loc, Qs); ---------------- efriedma-quic wrote:
I'm not sure this is the best way to write this... I mean, I guess it works, but it's hard to follow. Can you separate out the array handling a bit more? Maybe just put `QualType ProblemTy = Context.getBaseElementType(T)` before you start checking the inner type. https://github.com/llvm/llvm-project/pull/120896 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits