]> granicus.if.org Git - clang/commitdiff
Fix a broken rewritin of @implementation keyword.
authorFariborz Jahanian <fjahanian@apple.com>
Mon, 15 Feb 2010 21:11:41 +0000 (21:11 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Mon, 15 Feb 2010 21:11:41 +0000 (21:11 +0000)
(fixes radar 7649577).

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

lib/Frontend/RewriteObjC.cpp

index 74820905c2c7a5b139497f47bcc083e2d3422a71..9dade66d4ab4095c3b38aee379ae7fa2638f26a9 100644 (file)
@@ -1054,7 +1054,7 @@ void RewriteObjC::RewriteImplementationDecl(Decl *OID) {
   ObjCImplementationDecl *IMD = dyn_cast<ObjCImplementationDecl>(OID);
   ObjCCategoryImplDecl *CID = dyn_cast<ObjCCategoryImplDecl>(OID);
 
-  InsertText(IMD ? IMD->getLocEnd() : CID->getLocEnd(), "// ");
+  InsertText(IMD ? IMD->getLocStart() : CID->getLocStart(), "// ");
 
   for (ObjCCategoryImplDecl::instmeth_iterator
        I = IMD ? IMD->instmeth_begin() : CID->instmeth_begin(),