]> granicus.if.org Git - clang/commitdiff
Also fixed similar regression for class methods, as well as more indentations.
authorFariborz Jahanian <fjahanian@apple.com>
Mon, 17 Dec 2007 18:07:01 +0000 (18:07 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Mon, 17 Dec 2007 18:07:01 +0000 (18:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45107 91177308-0d34-0410-b5e6-96231b3b80d8

Driver/RewriteTest.cpp

index 87ebef4e878455fdff471f1b9ab5de7b194ff4f5..37f2901ad26aeac384ce78506f8d5024b616e94a 100644 (file)
@@ -1884,10 +1884,13 @@ void RewriteTest::RewriteObjcProtocolsMetaData(ObjcProtocolDecl **Protocols,
         Result += utostr(NumMethods);
         Result += "\n";
         
-               // Output instance methods declared in this protocol.
-               for (ObjcProtocolDecl::classmeth_iterator I = PDecl->classmeth_begin(), 
-                        E = PDecl->classmeth_end(); I != E; ++I) {
-          Result += "\t  ,{(SEL)\"";
+        // Output instance methods declared in this protocol.
+        for (ObjcProtocolDecl::classmeth_iterator I = PDecl->classmeth_begin(), 
+             E = PDecl->classmeth_end(); I != E; ++I) {
+          if (I == PDecl->classmeth_begin())
+            Result += "\t  ,{{(SEL)\"";
+          else
+            Result += "\t  ,{(SEL)\"";
           Result += (*I)->getSelector().getName().c_str();
           std::string MethodTypeString;
           Context->getObjcEncodingForMethodDecl((*I), MethodTypeString);