]> granicus.if.org Git - clang/commitdiff
Fix testsuite regression for "crash.m".
authorSteve Naroff <snaroff@apple.com>
Mon, 27 Oct 2008 20:54:44 +0000 (20:54 +0000)
committerSteve Naroff <snaroff@apple.com>
Mon, 27 Oct 2008 20:54:44 +0000 (20:54 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58269 91177308-0d34-0410-b5e6-96231b3b80d8

Driver/RewriteObjC.cpp

index 00604726fa3cb6f19145e671ff330c8450b86557..0796215a064c32420fb1d8c1e26dd79bad87e2d5 100644 (file)
@@ -1259,7 +1259,8 @@ Stmt *RewriteObjC::RewriteFunctionBodyOrGlobalInitializer(Stmt *S) {
       RewriteBlockCall(CE);
   }
   if (CastExpr *CE = dyn_cast<CastExpr>(S)) {
-    RewriteCastExpr(CE);
+    if (CE->getLocStart().isValid())
+      RewriteCastExpr(CE);
   }
 #if 0
   if (ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(S)) {
@@ -2576,6 +2577,7 @@ Stmt *RewriteObjC::SynthMessageExpr(ObjCMessageExpr *Exp) {
 
 Stmt *RewriteObjC::RewriteMessageExpr(ObjCMessageExpr *Exp) {
   Stmt *ReplacingStmt = SynthMessageExpr(Exp);
+  
   // Now do the actual rewrite.
   ReplaceStmt(Exp, ReplacingStmt);