diff options
| author | Chris Lattner <sabre@nondot.org> | 2008-05-28 16:38:23 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2008-05-28 16:38:23 +0000 |
| commit | 34873d21347b4b20df8b7947b78acfc196dd2e13 (patch) | |
| tree | 44f225d941b49f0a17226dd21ee2563ffea8c9db | |
| parent | c5c27f7bfeef40142d6144408bd30853e0d61f5f (diff) | |
| download | bcm5719-llvm-34873d21347b4b20df8b7947b78acfc196dd2e13.tar.gz bcm5719-llvm-34873d21347b4b20df8b7947b78acfc196dd2e13.zip | |
give location info to another paren expr.
llvm-svn: 51646
| -rw-r--r-- | clang/Driver/RewriteObjC.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/Driver/RewriteObjC.cpp b/clang/Driver/RewriteObjC.cpp index eb9d0125649..6d49c7eef06 100644 --- a/clang/Driver/RewriteObjC.cpp +++ b/clang/Driver/RewriteObjC.cpp @@ -875,7 +875,8 @@ Stmt *RewriteObjC::RewriteObjCIvarRefExpr(ObjCIvarRefExpr *IV, QualType castT = Context->getPointerType(Context->getTagDeclType(RD)); CastExpr *castExpr = new CastExpr(castT, IV->getBase(), SourceLocation()); // Don't forget the parens to enforce the proper binding. - ParenExpr *PE = new ParenExpr(SourceLocation(), SourceLocation(), castExpr); + ParenExpr *PE = new ParenExpr(IV->getBase()->getLocStart(), + IV->getBase()->getLocEnd(), castExpr); ReplaceStmt(IV->getBase(), PE); // Cannot delete IV->getBase(), since PE points to it. // Replace the old base with the cast. This is important when doing |

