forked from OSchip/llvm-project
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:
parent
97e277e55e
commit
d7f164d956
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue