The pointer is always dereferenced, so assert the cast is correct instead of returning nullptr
if (Type->isReferenceType()) {
CreatedValuesCount++;
- QualType PointeeType = Type->getAs<ReferenceType>()->getPointeeType();
+ QualType PointeeType = Type->castAs<ReferenceType>()->getPointeeType();
auto &PointeeLoc = createStorageLocation(PointeeType);
if (!Visited.contains(PointeeType.getCanonicalType())) {
if (Type->isPointerType()) {
CreatedValuesCount++;
- QualType PointeeType = Type->getAs<PointerType>()->getPointeeType();
+ QualType PointeeType = Type->castAs<PointerType>()->getPointeeType();
auto &PointeeLoc = createStorageLocation(PointeeType);
if (!Visited.contains(PointeeType.getCanonicalType())) {