]> granicus.if.org Git - clang/commitdiff
Integrate the following from the 'objective-rewrite' branch:
authorSteve Naroff <snaroff@apple.com>
Fri, 4 Dec 2009 21:36:32 +0000 (21:36 +0000)
committerSteve Naroff <snaroff@apple.com>
Fri, 4 Dec 2009 21:36:32 +0000 (21:36 +0000)
http://llvm.org/viewvc/llvm-project?view=rev&revision=70978

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90597 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/RewriteObjC.cpp

index a1ba4b88341ffae33401e7bd1115906d1ced68fe..13577762cbd65bcb7eb39b3263502814f52474d8 100644 (file)
@@ -2747,7 +2747,7 @@ void RewriteObjC::SynthesizeObjCInternalStruct(ObjCInterfaceDecl *CDecl,
       ReplaceText(LocStart, endHeader-startBuf, Result.c_str(), Result.size());
     } else {
       // rewrite the original header *without* disturbing the '{'
-      ReplaceText(LocStart, cursor-startBuf-1, Result.c_str(), Result.size());
+      ReplaceText(LocStart, cursor-startBuf, Result.c_str(), Result.size());
     }
     if (RCDecl && ObjCSynthesizedStructs.count(RCDecl)) {
       Result = "\n    struct ";