[cfe-commits] r66215 - /cfe/trunk/lib/Sema/SemaExpr.cpp

Chris Lattner sabre at nondot.org
Thu Mar 5 15:09:00 PST 2009


Author: lattner
Date: Thu Mar  5 17:09:00 2009
New Revision: 66215

URL: http://llvm.org/viewvc/llvm-project?rev=66215&view=rev
Log:
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];
           ~~~~~~~~~~~~~~~~~^


Modified:
    cfe/trunk/lib/Sema/SemaExpr.cpp

Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=66215&r1=66214&r2=66215&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Thu Mar  5 17:09:00 2009
@@ -2342,7 +2342,7 @@
     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;
 }





More information about the cfe-commits mailing list