Fixed a bug whereby a parethesized collection expression was not being rewritten correctly.
llvm-svn: 45776
diff --git a/clang/Driver/RewriteTest.cpp b/clang/Driver/RewriteTest.cpp
index ee2f8ef..1ba0af5 100644
--- a/clang/Driver/RewriteTest.cpp
+++ b/clang/Driver/RewriteTest.cpp
@@ -854,7 +854,7 @@
// 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";