[PATCH] D85144: [clang] Improve Dumping of APValues

Bruno Ricci via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 3 11:59:50 PDT 2020


riccibruno added inline comments.


================
Comment at: clang/lib/AST/APValue.cpp:539
         Out << '[' << Path[I].getAsArrayIndex() << ']';
-        ElemTy = Ctx.getAsArrayType(ElemTy)->getElementType();
+        ElemTy = cast<ArrayType>(ElemTy.getCanonicalType())->getElementType();
       }
----------------
And also I don't think that this change is safe since `ASTContext::getAsArrayType` applies qualifiers from the array type to the element type.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85144/new/

https://reviews.llvm.org/D85144



More information about the cfe-commits mailing list