diff options
Diffstat (limited to 'Driver/RewriteTest.cpp')
-rw-r--r-- | Driver/RewriteTest.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Driver/RewriteTest.cpp b/Driver/RewriteTest.cpp index 92d928cd08..d953e08581 100644 --- a/Driver/RewriteTest.cpp +++ b/Driver/RewriteTest.cpp @@ -1178,7 +1178,10 @@ void RewriteTest::SynthesizeObjcInternalStruct(ObjcInterfaceDecl *CDecl, while (cursor < endBuf) { if (*cursor == '@') { SourceLocation atLoc = LocStart.getFileLocWithOffset(cursor-startBuf); - cursor = strchr(cursor, 'p'); + // Skip whitespace. + for (++cursor; cursor[0] == ' ' || cursor[0] == '\t'; ++cursor) + /*scan*/; + // FIXME: presence of @public, etc. inside comment results in // this transformation as well, which is still correct c-code. if (!strncmp(cursor, "public", strlen("public")) || |