================
@@ -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 guess I wasn't clear enough.

My suggestion was to call `Context.getBaseElementType(T)`, and then perform all 
the pointer type/object type/etc. on the result of that, instead of recursively 
calling BuildQualifiedType.

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

Reply via email to