add source range for type of super cast, giving something like:

SemaObjC/call-super-2.m:78:29: error: cannot cast 'super' (it isn't an expression)
   return [(Object <Func> *)super instance_func0];
           ~~~~~~~~~~~~~~~~~^

llvm-svn: 66215
This commit is contained in:
Chris Lattner 2009-03-05 23:09:00 +00:00
parent 97e277e55e
commit d7f164d956
1 changed files with 1 additions and 1 deletions

View File

@ -2342,7 +2342,7 @@ bool Sema::CheckCastTypes(SourceRange TyR, QualType castType, Expr *&castExpr) {
if (CheckVectorCast(TyR, castType, castExpr->getType()))
return true;
} else if (getLangOptions().ObjC1 && isa<ObjCSuperExpr>(castExpr)) {
return Diag(castExpr->getLocStart(), diag::err_illegal_super_cast);
return Diag(castExpr->getLocStart(), diag::err_illegal_super_cast) << TyR;
}
return false;
}