diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2008-01-09 17:50:00 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2008-01-09 17:50:00 +0000 |
commit | 22f234779191f297960b5e1eedeaef08ebd10c66 (patch) | |
tree | d926840fc77c827684118c3780400cb1208fbb54 /clang/Driver/RewriteTest.cpp | |
parent | 4de0c3978d27886fe582871575fa33841d3ed276 (diff) | |
download | bcm5719-llvm-22f234779191f297960b5e1eedeaef08ebd10c66.tar.gz bcm5719-llvm-22f234779191f297960b5e1eedeaef08ebd10c66.zip |
Fixed a bug whereby a parethesized collection expression was not being rewritten correctly.
llvm-svn: 45776
Diffstat (limited to 'clang/Driver/RewriteTest.cpp')
-rw-r--r-- | clang/Driver/RewriteTest.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/Driver/RewriteTest.cpp b/clang/Driver/RewriteTest.cpp index ee2f8ef2f65..1ba0af5ae33 100644 --- a/clang/Driver/RewriteTest.cpp +++ b/clang/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"; |