aboutsummaryrefslogtreecommitdiff
path: root/Driver/RewriteTest.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2008-01-09 17:50:00 +0000
committerFariborz Jahanian <fjahanian@apple.com>2008-01-09 17:50:00 +0000
commit3f76f2aa6e479bc6ec73aa449975804751da8109 (patch)
treef372813185eeb6aa647367a67584afff10430d93 /Driver/RewriteTest.cpp
parente84b04037a7a5e549def5bab415e7d46def9e3c4 (diff)
Fixed a bug whereby a parethesized collection expression was not being rewritten correctly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45776 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver/RewriteTest.cpp')
-rw-r--r--Driver/RewriteTest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Driver/RewriteTest.cpp b/Driver/RewriteTest.cpp
index ee2f8ef2f6..1ba0af5ae3 100644
--- a/Driver/RewriteTest.cpp
+++ b/Driver/RewriteTest.cpp
@@ -854,7 +854,7 @@ Stmt *RewriteTest::RewriteObjCForCollectionStmt(ObjCForCollectionStmt *S) {
// Replace ')' in for '(' type elem in collection ')' with ';'
SourceLocation endCollectionLoc = S->getCollection()->getLocEnd();
const char *endCollectionBuf = SM->getCharacterData(endCollectionLoc);
- const char *lparenBuf = strchr(endCollectionBuf, ')');
+ const char *lparenBuf = strchr(endCollectionBuf+1, ')');
SourceLocation lparenLoc = startLoc.getFileLocWithOffset(lparenBuf-startBuf);
buf = ";\n\t";