[cfe-commits] r51646 - /cfe/trunk/Driver/RewriteObjC.cpp

Chris Lattner sabre at nondot.org
Wed May 28 09:38:23 PDT 2008


Author: lattner
Date: Wed May 28 11:38:23 2008
New Revision: 51646

URL: http://llvm.org/viewvc/llvm-project?rev=51646&view=rev
Log:
give location info to another paren expr.

Modified:
    cfe/trunk/Driver/RewriteObjC.cpp

Modified: cfe/trunk/Driver/RewriteObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/RewriteObjC.cpp?rev=51646&r1=51645&r2=51646&view=diff

==============================================================================
--- cfe/trunk/Driver/RewriteObjC.cpp (original)
+++ cfe/trunk/Driver/RewriteObjC.cpp Wed May 28 11:38:23 2008
@@ -875,7 +875,8 @@
       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





More information about the cfe-commits mailing list