diff options
author | Steve Naroff <snaroff@apple.com> | 2008-10-27 20:54:44 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2008-10-27 20:54:44 +0000 |
commit | 80c28553e08d5f294801bc51f0e91df43f64a940 (patch) | |
tree | b3dba35b2692376398fecc0abebc4ee28d37965a | |
parent | d611bac92c6766eb7783619484156e2a86175f50 (diff) |
Fix testsuite regression for "crash.m".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58269 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | Driver/RewriteObjC.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Driver/RewriteObjC.cpp b/Driver/RewriteObjC.cpp index 00604726fa..0796215a06 100644 --- a/Driver/RewriteObjC.cpp +++ b/Driver/RewriteObjC.cpp @@ -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); |