diff options
author | Chris Lattner <sabre@nondot.org> | 2009-03-05 23:09:00 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-03-05 23:09:00 +0000 |
commit | e6ee6bab61ab61eeceb3572bd5a9f85a9424eb9f (patch) | |
tree | 2b8cf0eec975c9f3174a201237394ff2c7656a41 | |
parent | 6f8ce146b52eace27f33bf6e0788f4be4f104404 (diff) |
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];
~~~~~~~~~~~~~~~~~^
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66215 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<ObjCSuperExpr>(castExpr)) { - return Diag(castExpr->getLocStart(), diag::err_illegal_super_cast); + return Diag(castExpr->getLocStart(), diag::err_illegal_super_cast) << TyR; } return false; } |