From e6ee6bab61ab61eeceb3572bd5a9f85a9424eb9f Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 5 Mar 2009 23:09:00 +0000 Subject: [PATCH] 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 *)super instance_func0]; ~~~~~~~~~~~~~~~~~^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66215 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaExpr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 8630da3c3f..9ddee60701 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -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(castExpr)) { - return Diag(castExpr->getLocStart(), diag::err_illegal_super_cast); + return Diag(castExpr->getLocStart(), diag::err_illegal_super_cast) << TyR; } return false; } -- 2.50.1