Fix <rdar://problem/6297052> confused in some way by embedded /* */ comments.

llvm-svn: 57903
This commit is contained in:
Steve Naroff 2008-10-21 13:37:27 +00:00
parent 56aa731a63
commit e020fa1b85

View File

@ -595,8 +595,8 @@ void RewriteObjC::RewriteMethodDeclaration(ObjCMethodDecl *Method) {
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);
}