return "IntegralToPointer";
case CastExpr::CK_PointerToIntegral:
return "PointerToIntegral";
+ case CastExpr::CK_ToVoid:
+ return "ToVoid";
}
assert(0 && "Unhandled cast kind!");
// type needs to be scalar.
if (castType->isVoidType()) {
// Cast to void allows any expr type.
- } else if (!castType->isScalarType() && !castType->isVectorType()) {
+ Kind = CastExpr::CK_ToVoid;
+ return false;
+ }
+
+ if (!castType->isScalarType() && !castType->isVectorType()) {
if (Context.getCanonicalType(castType).getUnqualifiedType() ==
Context.getCanonicalType(castExpr->getType().getUnqualifiedType()) &&
(castType->isStructureType() || castType->isUnionType())) {