[cfe-commits] r57903 - /cfe/trunk/Driver/RewriteObjC.cpp

Steve Naroff snaroff at apple.com
Tue Oct 21 06:37:29 PDT 2008


Author: snaroff
Date: Tue Oct 21 08:37:27 2008
New Revision: 57903

URL: http://llvm.org/viewvc/llvm-project?rev=57903&view=rev
Log:
Fix <rdar://problem/6297052> confused in some way by embedded /* */ comments.

Modified:
    cfe/trunk/Driver/RewriteObjC.cpp

Modified: cfe/trunk/Driver/RewriteObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/RewriteObjC.cpp?rev=57903&r1=57902&r2=57903&view=diff

==============================================================================
--- cfe/trunk/Driver/RewriteObjC.cpp (original)
+++ cfe/trunk/Driver/RewriteObjC.cpp Tue Oct 21 08:37:27 2008
@@ -595,8 +595,8 @@
   SourceLocation LocEnd = Method->getLocEnd();
     
   if (SM->getLineNumber(LocEnd) > SM->getLineNumber(LocStart)) {
-    InsertText(LocStart, "/* ", 3);
-    ReplaceText(LocEnd, 1, ";*/ ", 4);
+    InsertText(LocStart, "#if 0\n", 6);
+    ReplaceText(LocEnd, 1, ";\n#endif\n", 9);
   } else {
     InsertText(LocStart, "// ", 3);
   }





More information about the cfe-commits mailing list